LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Finding vi running in subpanel from a subpanel control reference?

I've poked around considerably and cannot find a way to take a control reference to a subpanel control and get the vi reference for the current vi running inside the subpanel.
 
I know I can save this locally inside the vi containing the subpanel (from the invoke node call to insertvi), but I'm wanting to do this externally from an app that just has references to all the controls.
 
Any help would be greatly appreciated.
 
Thanks
0 Kudos
Message 1 of 6
(3,355 Views)
Well, you put the name of the VI (or a reference to it) in a hidden control on the calling VI. The it would still be available - just from a different control.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 6
(3,347 Views)
Yeah, sure that works, but I was hoping for a generic answer that imposes no design requirements on the VI in question.  What you propose is a good fall back if there is no way to do it through the api.

Not sure why NI has no easy way to find this out.

0 Kudos
Message 3 of 6
(3,317 Views)
If I'm interpreting you correctly, you would like to find the VI reference of the subpanel VI based off one if it's control references that has been passed to some external application from the VI that contains the subpanel VI?  See the attached VIs for an example if this is the case.

"VI with subpanel" passes a control reference to "SubVI" which can then get the reference to the "VI in subpanel".


I grabbed the original files from here:

http://digital.ni.com/public.nsf/allkb/0B11E4964685B49F862571430000091E?OpenDocument


Trey B
Applications Engineering
National Instruments

Message Edited by Trey B on 07-24-2007 11:30 PM

Download All
0 Kudos
Message 4 of 6
(3,298 Views)
Close, but not quite. The issue is given a reference to the VI with the subpanel, how do you find the name of the VI that appears in the subpanel.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 5 of 6
(3,279 Views)
Ah, I understand now.  A list of subpanel VIs does not appear to be exposed through the owning VI.  I've created a product suggestion for this to be exposed.  You'll need to explicitly pass the reference of the subpanel VI to the external VI/app, or its path/name, or the way I posted earlier.

Trey B
Applications Engineering
National Instruments
0 Kudos
Message 6 of 6
(3,257 Views)