07-15-2011 09:27 AM
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?
Solved! Go to Solution.
05-12-2012 08:55 AM - edited 05-12-2012 08:56 AM
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
05-14-2012 03:52 AM
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.
05-14-2012 04:30 AM
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,