LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change front panel objects properties of a closed VI from another VI

Hello! I'd like to change strings of a menu ring in a front panel closed VI from another VI that is opened...anyone can help me?
I attached the VIs, but this example works only if the target VI's front panel is opened.

Thanx a lot, bye Stefano
Message 1 of 5
(2,858 Views)
Hi,
you should use the method Save Instrument after you change the default values. The problem is that you can't use it on an existing vi when you have opened a reference on, it returns an error.
A workaround is to move first the vi to a temporary location, open a reference on it, change its default values and save it to the target destination. You don't need to open the front panel.
See attached image for saving vi.
Good luck,
Alberto
Message 2 of 5
(2,845 Views)
Thanks a lot for your help Alberto, i thought to the same solution but i'd like to solve the problem without using temporary files....if it could be possible.....
0 Kudos
Message 3 of 5
(2,838 Views)
It is possible: Open untitled2.vi and change the ring menu items of untitled.vi (both need to be in the same directory in the example)
Message 4 of 5
(2,822 Views)
Amazing! I didn't try that way.
Forget all what I said above!
Thanks for sharing,
Alberto
Message 5 of 5
(2,814 Views)