10-10-2008 10:59 AM
... if it is contained in a subpanel? If so, how do I get the reference to that subpanel?
Sanks
Solved! Go to Solution.
10-10-2008 11:29 AM
Hi there
you could check the call chain inside the sub VI. If there is no caller, the sub VI has been called from inside a sub panel. To get the reference of the sub panel you could use a FGV to pass the reference from top to sub.
10-10-2008 01:26 PM
10-10-2008 02:18 PM
A VI in a subpanel must run as a toplevel VI so it has no callers. Use the property node "Execution.State" and check for "run top level". But you cannot know if it is really inserted in a subpanel container unless you know it will not run otherwise and you do not know if the VI is currently inserted in the subpanel container.
To get the reference of the subpanel container in your VI you can use any method of data interchange used for parallel running VIs:
- Setting the control value of a control refnum
- Using a Functional Global Variable also know as Action Engine
- Sending through a queue
- Sending through a user defined event
10-13-2008 04:40 AM