LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting owning VI of a subpanel

Solved!
Go to solution

Hi,

 

I need to get the frontmost VI reference of an XControl, to send to the "change cursor" VI. In Normal situations, the XControl has the "Owning VI" property, this is fine.

But if the XControl's owning VI is inside a subpanel, passing its reference to "change cursor" doesn't work, it needs the reference of the VI that owns the subpanel frame.

 

I found a solution by using the OpenG's "find frontmost VI", but I wonder if there is a solution, given a VI ref embeded in a subpanel, to get the VI ref that owns a panel as a subpanel?

0 Kudos
Message 1 of 4
(3,374 Views)

Hello,

 

I have quite the same issue. Does anyone has a way to deal with this problem ?

 

Actually, I'm building a large app where I need to check from a list of VI reference, for each of them, if it is currently running within a subpanel or not. If yes, I need to get the reference of the owner subpanel VI.

 

The only step I found till now is to try setting the Front panel Window : State property, which return an error if the VI is within a subpanel. It allows me to know that the VI is in a subpanel but I cannot access its reference.

 

I cannot edit the VIs contained in subpanels, do you know a way to do that ?

 

I'm using LabVIEW 2009SP1 or LabVIEW 2011SP1

 

Thanks in advance,

Cheers,

 

Remi

LabVIEW Developper

0 Kudos
Message 2 of 4
(2,996 Views)
Solution
Accepted by topic author CharlesB64

There's an entry for this feature in Idea Exchange: http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Add-subpanel-property-VI-Ref/idi-p/1214481

 

It's now implemented in LV2012 beta, you can (not sure) apply to be a beta tester if you can't wait and report any bugs.

0 Kudos
Message 3 of 4
(2,977 Views)

Hi Charles,

 

Thanks for your answer ! This post deals about the problem, I added a Kudos although my exact need is to get from a VI reference, if the VI is currently running in a SP or not, which is slightly different.

 

Have nice day !

Cheers,

0 Kudos
Message 4 of 4
(2,973 Views)