11-08-2009 02:15 PM
I have a typedef on a VI front panel and I would like to programmatically resave it to a new path/name.
with a VI I would open a reference to the VI and use the method "Save.Instrument" save a copy: true, and input a path.
What I have tried was to open a reference to the VI that uses the typedef, got a property node reference to it's panel, then a property of array of control references - but generally controls can't be 'saved-as' but a typedef could - only there is no method for this.
Is there a way to do this?
Solved! Go to Solution.
11-09-2009 02:12 AM
The control class has a property called TypedefVI which returns a reference to the VI of the typedef which you can then save. The only catch is that this method seems to be a scripting method, so you will need to install scripting first.
Another alternative, if you don't want to use scripting stuff, is to use the Callees property on the VI. This will return the names of all the typedefs it uses (which you can then use with the Open VI Reference primitive), but you should note that this doesn't give you a way of associating a specific control with a specific typedef.
11-09-2009 05:59 AM
okay, I've installed the LV2009 scripting API, I have the control class /typedef method returning the ref - haven't finished coding/testing but I should be good to go
thanks a lot
lmd2