Jump to content

List of paramerer values


---
 Share

Recommended Posts

Hi,
Is there a way to extract by PCM the list of Parameters (variables in Cache)?
Currently I'm setting these variables (one by one) to the output protocol for audit Information;

Could be easier using a loop with the list of Parameters and the function: getParameterNamed().

1375_09ff98d93bce288ce56e03fc114ed848.png
Link to comment
Share on other sites

Uugh, I started to write a novel explaining dictionaries and keys etc, and the method I'm using, but I got bored. This will do what you asked for.
Just remember that it will show the value of your loop index that's currently cached when the key comes up as index in the loop. (Key is what you would call variable) My recommendation is to remove the key "i", form your export to file if that's the index holder. Since it has no real purpose for your task.
for i = 1 to baseSystem().machine.inspection.cache.temporaryParameters.dict.keys.size
	display(getParameterNamed(baseSystem().machine.inspection.cache.temporaryParameters.dict.associations,i))
next i
Anyhow, my recommendation would be to use this, unless you need some specific formatting. Since you really don't need a loop.
addToFile(xxx,baseSystem().machine.inspection.cache.temporaryParameters.dict.associations)
I guess the loop method can potentially set you in a endless loop if you set variables within it. Eg.
var[i]
Link to comment
Share on other sites

🫣,
I have other Question:
is it possible to extract the Parameter List ? (which is not in the Cahe when the program starts)
the Cache solution works great, but when I have too many variables is too much Information.

1375_a84492cd62c9c2bf6ef6d1c6d7d10389.png
Link to comment
Share on other sites

Im not sure I understand. That list is empty until variables a computed. Although pcm will be read in to cache when a measurement plan is opened. It belive occurs in step 6 of the loading. I know that since I once stored reference information in a variable, making the whole plan unable to load.

Pleace describe what you like to accomplish. It's so much easier to help, if I know purpouse, to get the whole picture. Right now Im not sure what you ask for.

Some times threads consists of one question, 15 wild guesses with different answers and suggetions wich all are wrong, intil the original poster clarifies and then the right answer usually turns up in 5 minutes... It's a nightmare for anyone searching in the future 🙂
Link to comment
Share on other sites

Now I think I understand. How ever, isn't it very counterproductive to create a list, if you read them from a list in the first place? Since you already have them, why don't you just write it as a string on your protocol directly?

Well is this what you are trying to achieve? 114_472955146747d3b2dcd9b1632c2eeb9e.png
This one you can get as a nicely formatted string, exactly like the list you already have.
baseSystem().machine.inspection.definitions.parameters
Link to comment
Share on other sites

  • 2 years later...
Hello CMM group
Sometimes in order to avoid say ever, I am out of context in PCM.
I was trying to find the components (attributes, methods, etc.) of any Parameter, ex:
baseSystem().machine.inspection.cache.temporaryParameters.dict.keys.size
Impossible to find it in the Help or in all pdf files.
As an OOP some references exists, but where to find them.
The last answer to my problem of True Position characteristic was:
THIS_ACT=formatL(getActual(THIS_CHAR).deviation, 6,4) while for the rest is ".actual,4,4)" independently that all are labeled "Actual".
Link to comment
Share on other sites

 Share

×
×
  • Create New...