Our online shopping is experiencing intermittent service disruptions.
Support teams are actively working on the resolution.
Our online shopping is experiencing intermittent service disruptions.
Support teams are actively working on the resolution.
02-14-2013 08:56 AM
Hi - I have a need to automate some sorting and deleting functions in a strict type def of a enum control that I have. I would like to write a couple of programs to take care of that rather than go into the control type def and do it all manually. The fact that a person can do those through the edit dialog tells me that you should be able to access those methods via scripting.
So, the basic question is; How do I get a reference to that control?
Thanks,
Dan
Solved! Go to Solution.
02-14-2013 09:18 AM
The easiest way would be to open the typedef control using Open VI Reference, get a reference to the enum on the front panel, then modify the Strings[] property to set the value labels.
It appears this will not work in LV2012. For some reason, the Strings[] property is returning a list of indices instead of the strings. You can work around this by setting the value and using the Ring Text property to access the individual strings. I have not tried this (busy!), but it should work.
02-14-2013 09:21 AM
A custom control is actually a VI, so use the Open VI Reference and give it the path to the typedef. Use the resulting VI reference to get the reference of the actual control on the FP and then call the Save Instruments method on the VI when you're done.
02-14-2013 09:27 AM
Slap to Forehead - DUH moment
Since I'm using the enum as the main driver of the producer consumer state machine program that I'm working on, I don't have a front panel control to reference (just using constants on the BD), so I was trying to use the .ctl and get a reference to it through that.
I just need to create a FP object, get a reference to that and hide the FP control, then work the magic from there.
Thanks for the kick to the mind DFGray.
Dan
02-14-2013 09:37 AM
Thanks.
I used TST's solution.
Dan