Jump to content

Starting program with a 0 as first number


---
 Share

Recommended Posts

Hi,
I´ve been trying to use a PCM program that uses parametric files to start my program. These parametric files start with a 0.
I´m using a inquireParameterList function to call on these para files.

When i run the program it seems like calypso ignores the first 0 and therefore cant run the program.
I was wondering if i need to remove the 0 from the para files or if there is a way to run a program that starts with a 0.
Link to comment
Share on other sites

It is possible, but it would be preferred to not change the names of the para files because they refer to the product codes for each specific article.
Link to comment
Share on other sites

Hello!

I assume that you have pcm. So, why don't you just add the 0 in the pre-settings of inspection plan?

For Instance something like this:

para_typ=".para"              // Typ of Para-file
para_path="Path_to_X\"  // Path to Para-file
para_file=""
inquireParameterList("para_file","some comment")
para_file="0" + para_file   // Add 0

para_file= para_path + para_file + para_typ  // complete Para-file definition
Link to comment
Share on other sites

The thing with inquireParameterList() converting the parameter to a number if it seems to be a number is an anoying thing. However there are some solutions to it.

Are there any other parameters that you input in in the same input window or is the parametric file the only one?
If that is the only one you can replace it with inquireText() instead or you could even get a list with all the parameterfiles in a certain folder. You could also launch a file dialog (selectFileDialog()) and browse your way to the file if you want.

If there are several parameters that you input in the inquireParameterList and you don't want to separate them into two separate inputs you need to change the parameter itself after you type it in. Are there any rules to the names? For example there are always a minimum number of characters in the name. Then you could just check the length of the string and add that many zeroes in front of it that you need to conform to the rule.

If there are no rules i suggest you just check if the file exists and if it doesn't you just add a 0 and try again. Still missing? you add another 0. Repeat that enough times to cover all the possible names.
Link to comment
Share on other sites

 Share

×
×
  • Create New...