LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can i get the reference to Controls from VI-reference

Hello,
i have a VI with ~5 controls on it.
And with the Object "Current VIs path" and "Open VI reference" i can create a reference to the current VI.
How can i create now a reference to the controls? (Starting with VI-reference?
Of course i know how to create directly a reference from a control.
My idea wasm that there areperhaps properties like:
- Number of controls
- Name of control
- Type of control (string, bool. number...)

Is this somewhere there and i just dont find it?

Thanks for your help


0 Kudos
Message 1 of 5
(5,366 Views)
Once you have the VI Refnum, it's a two-step process. Wire the VI Refnum into a property node and get a reference to the Front Panel. Output the Front Panel reference into another property node and select the property Controls[ ], which outputs an array of references for all the controls on the front panel.


Message Edited by Jarrod S. on 04-20-2007 11:06 AM

Jarrod S.
National Instruments
Message 2 of 5
(5,363 Views)
Hello Jarrod,
this was exactly what i was looking for.

Thank your very much for your fast help.

0 Kudos
Message 3 of 5
(5,352 Views)
I have a similar question which I posted new. The question is how to access the data in those controls through the references, except the label and ID?  thanks.
0 Kudos
Message 4 of 5
(5,348 Views)
Just use the value property. You'll get a variant because the property node won't know what type it is, so you then have to use 'variant to data' to convert this to correct type.
0 Kudos
Message 5 of 5
(5,341 Views)