LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I get the current VI's reference

I want to use the "Reset All To Default" Invoke Node inside a sub-vi to reset the controls in the main vi, not the sub-vi, so I gess I'll need the main vi's refernce. Not sure how to do that. Thanks.
Richard






0 Kudos
Message 1 of 4
(4,580 Views)
To get the reference to your parent VI you can use the VI property "Callers" to get the names of the VIs calling the SubVI. You can then just open a refernce to those names. Because the main VI is in memory you can use the name string, rather than a path input.
Message 2 of 4
(4,580 Views)
If you know the full path to the main vi, you can wire it to the "Open vi
Reference" function and produce a reference to the main vi. However, I don't
think you can change the defaults in a vi while it is running.

Tom

"Broken Arrow" wrote in message
news:5065000000080000003BF10000-1079395200000@exchange.ni.com...
>I want to use the "Reset All To Default" Invoke Node inside a sub-vi
> to reset the controls in the main vi, not the sub-vi, so I gess I'll
> need the main vi's refernce. Not sure how to do that. Thanks.
Message 3 of 4
(4,580 Views)
For some reason, NI didn't email me when I got answers to this! (?) Anyhoo, thanks for your answer. I think you are right. Short of wiring up a LOT of individual Globals, I'm not sure how to set do what I want to do. In 3 years of LabVIEWing, I have never used a Global Variable!
Richard






0 Kudos
Message 4 of 4
(4,580 Views)