hooovahh Posted July 9, 2012 Report Share Posted July 9, 2012 I think I know the answer to this, but is there a way to know if a VI is loaded into a subpanel from the VI that may or may not be in the subpanel? So say I have 5 VIs running, each of them can be loaded one at a time into a single subpanel in a 6th VI which is running. Is there a way to know from any of the 5 running VIs, if they are currently loaded into the subpanel? At the moment I am keeping track of which VI is in the subpanel from the 6th VI which the subpanel is in and this works fine, I just didn't know if there was a better solution. I have also noticed that the property Front Panel >> Title Bar Visible will be false if a VI is in a subpanel, so this could be used as long as the VI has the Window Has Title Bar set to true in the VI properties. This solution won't work for me, because there is the occasion where the VI will have no title bar, but will be outside the subpanel. Quote Link to comment
Saverio Posted July 9, 2012 Report Share Posted July 9, 2012 What about looking at the Front Panel Window's Open property? Quote Link to comment
hooovahh Posted July 9, 2012 Author Report Share Posted July 9, 2012 (edited) What about looking at the Front Panel Window's Open property? This returns true when in a subpanel. EDIT: Also I started looking at the properties/methods available to a subpanel and I was surprised at how few there are. I couldn't even find one to tell me what VI was loaded into the subpanel. Is there really no way to know what is in a subpanel. DOUBLE EDIT: Apparently it is in 2012 beta. http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Add-subpanel-property-VI-Ref/idi-p/1214481 Edited July 9, 2012 by hooovahh Quote Link to comment
Saverio Posted July 9, 2012 Report Share Posted July 9, 2012 Isn't that what you were after? If the subVI is running on its own as a "regular" subVI then its front panel would not be open. When in a subpanel the front panel has to be open, so the subVI can check itself based on whether its front panel is open. The property would still be true when the VI is running on its own, but does that matter in this case? Quote Link to comment
crelf Posted July 9, 2012 Report Share Posted July 9, 2012 Isn't that what you were after? If the subVI is running on its own as a "regular" subVI then its front panel would not be open. That's not always true - a subVI can show its panel. Quote Link to comment
hooovahh Posted July 9, 2012 Author Report Share Posted July 9, 2012 (edited) Isn't that what you were after? If the subVI is running on its own as a "regular" subVI then its front panel would not be open. When in a subpanel the front panel has to be open, so the subVI can check itself based on whether its front panel is open. The property would still be true when the VI is running on its own, but does that matter in this case? Sorry I didn't give more detail, I didn't want to inundate anyone with too much information, especially if the answer was a simple property node. I'm doing something similar to Ben's Docking code. http://forums.ni.com...cending#M351512 Here VIs get pulled out (sorta) and become floating windows. In this case the VI always is open, it just may be in its own window, or in the subpanel. What crelf said. Edited July 9, 2012 by hooovahh Quote Link to comment
Saverio Posted July 9, 2012 Report Share Posted July 9, 2012 That's not always true - a subVI can show its panel. Well, yes, obviously, but is that a concern here? Just because something is possible doesn't mean it's relevant in this case. Quote Link to comment
Popular Post j_meier Posted July 9, 2012 Popular Post Report Share Posted July 9, 2012 The last time I had this problem I found this: http://digital.ni.com/public.nsf/allkb/FB79ED8B6D07257B86256E93006E31FA Written for LV 8.2, still true in 2011 AFAIK. 4 Quote Link to comment
Saverio Posted July 9, 2012 Report Share Posted July 9, 2012 Sorry I didn't give more detail, I didn't want to inundate anyone with too much information. I'm doing something similar to Ben's Docking code. http://forums.ni.com...cending#M351512 Here VIs get pulled out (sorta) and become floating windows. In this case the VI always is open, it just may be in its own window, or in the subpanel. What crelf said. Well, that changes things considerably, now doesn't it? It would have helped to have this information up front. Quote Link to comment
hooovahh Posted July 9, 2012 Author Report Share Posted July 9, 2012 The last time I had this problem I found this: http://digital.ni.co...6256E93006E31FA Written for LV 8.2, still true in 2011 AFAIK. This works perfectly thank you. Quote Link to comment
crelf Posted July 9, 2012 Report Share Posted July 9, 2012 Well, yes, obviously, but is that a concern here? Just because something is possible doesn't mean it's relevant in this case. Sure, but remember that users with all levels of LabVIEW knowledge might read your post, and I'd rather it was more clear is all. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.