jgcode Posted September 10, 2009 Report Share Posted September 10, 2009 (edited) Is there a way for a VI to tell if it is currently loaded in a subpanel? Maybe a property? Anyone know? Cheers JG Edited September 10, 2009 by jgcode Quote Link to comment
ShaunR Posted September 10, 2009 Report Share Posted September 10, 2009 Is there a way for a VI to tell if it is currently loaded in a subpanel? Maybe a property? Anyone know? Cheers JG Not sure if there is a better way. But if you try to load it into a sub-panel and it is already in one, you will get Error 1145 Possible Reason(s) Labview: Cannot open VI because it is already in a subpanel control. If its not in memory, it will succeed, and if its already running but not in a sub panel you get Error 1144 LAbview: Cannot insert VI in subpanel because VI is already open. 1 Quote Link to comment
Grampa_of_Oliva_n_Eden Posted September 10, 2009 Report Share Posted September 10, 2009 Not sure if there is a better way. But if you try to load it into a sub-panel and it is already in one, you will get Error 1145 Possible Reason(s) Labview: Cannot open VI because it is already in a subpanel control. If its not in memory, it will succeed, and if its already running but not in a sub panel you get Error 1144 LAbview: Cannot insert VI in subpanel because VI is already open. Excellent "cat skinning" there Shaun! You absolutely shreaded the "box" I was thinking in. Ben 1 Quote Link to comment
Gary Rubin Posted September 10, 2009 Report Share Posted September 10, 2009 (edited) Excellent "cat skinning" Uh, oh. Ben, were you not reading the CLAD thread yesterday, or did you just feel like rattling some cages? Edited to add link. Edited September 10, 2009 by Gary Rubin Quote Link to comment
Grampa_of_Oliva_n_Eden Posted September 10, 2009 Report Share Posted September 10, 2009 Uh, oh. Ben, were you not reading the CLAD thread yesterday, or did you just feel like rattling some cages? I had no idea what was posted yesterday since I can't convince the LAVA site to show me unread threads. Its is like I have to stand here and watch it to see message come up. I feel like I am viewing the landscape out of a train window. I can't look back or forward but can only catch a glimpse of what is passing at the moment and that is on my work machine. On my home machine it is like the drapes are closed. Ben Quote Link to comment
hooovahh Posted September 10, 2009 Report Share Posted September 10, 2009 I had no idea what was posted yesterday since I can't convince the LAVA site to show me unread threads. Its is like I have to stand here and watch it to see message come up. I feel like I am viewing the landscape out of a train window. I can't look back or forward but can only catch a glimpse of what is passing at the moment and that is on my work machine. On my home machine it is like the drapes are closed. Ben This isn't really the right tread for this but why don't you use the RSS feature? Not that the RSS is 100% right now, but it doesn't miss content, it just some times adds old content. I use outlook for my RSS reader, but a better solution for you might be Google reader. It's an in browser RSS reader that is linked to your gmail account. So if you read some RSS at work then go home it will show that you read those articles. reader.google.com Quote Link to comment
jgcode Posted September 10, 2009 Author Report Share Posted September 10, 2009 (edited) Not sure if there is a better way. But if you try to load it into a sub-panel and it is already in one, you will get Error 1145 Possible Reason(s) Labview: Cannot open VI because it is already in a subpanel control. If its not in memory, it will succeed, and if its already running but not in a sub panel you get Error 1144 LAbview: Cannot insert VI in subpanel because VI is already open. Cheers, but its not that I want to load it, I just want to know when the VI tests itself - is it the "active VI" in the subpanel out of a possible number of VIs at a given time. So if it isn't I don't want any actions to be performed, so unfortunately this will not work for my task. Thanks tho. <edit> Ok had a thought and it worked The Front Panel:Open property is True when the VI is loaded in the subpanel False otherwise Easy! Problem sorted Cheers </edit> Edited September 10, 2009 by jgcode 1 Quote Link to comment
ShaunR Posted September 10, 2009 Report Share Posted September 10, 2009 Excellent "cat skinning" there Shaun! You absolutely shreaded the "box" I was thinking in. Ben I have my moments. As few and far between as they may be though Cheers, but its not that I want to load it, I just want to know when the VI tests itself - is it the "active VI" in the subpanel out of a possible number of VIs at a given time. So if it isn't I don't want any actions to be performed, so unfortunately this will not work for my task. Thanks tho. <edit> Ok had a thought and it worked The Front Panel:Open property is True when the VI is loaded in the subpanel False otherwise Easy! Problem sorted Cheers </edit> Ah. Thought you wanted to definitively know. Just for reference. It will also show as maximized. Quote Link to comment
jgcode Posted September 10, 2009 Author Report Share Posted September 10, 2009 (edited) Ah. Thought you wanted to definitively know. Just for reference. It will also show as maximized. I am using LV2009 and FP:State property toggles between Standard (in subpanel) and Closed (not in subpanel)- but not maximized ?? That is ok tho, cause now I have a way for the VI to test itself. Cheers Edited September 10, 2009 by jgcode Quote Link to comment
K-node Posted September 22, 2009 Report Share Posted September 22, 2009 I am using LV2009 and FP:State property toggles between Standard (in subpanel) and Closed (not in subpanel)- but not maximized ?? That is ok tho, cause now I have a way for the VI to test itself. Cheers Can I have multiple subpanels (on the same 'main' vi) show the same opened vi? Each representing its own instance (and access to its own data)? Say forinstance that I have a VI that shows a word from a list. I have three lists - one each for subject, verb and object. I know how to set the value of a front panel item, so I can set a VI's data in that respect. I just cannot seem to InsertVI into multiple subpanels. Any suggestions? Quote Link to comment
Mark Yedinak Posted September 22, 2009 Report Share Posted September 22, 2009 Can I have multiple subpanels (on the same 'main' vi) show the same opened vi? Each representing its own instance (and access to its own data)? Say forinstance that I have a VI that shows a word from a list. I have three lists - one each for subject, verb and object. I know how to set the value of a front panel item, so I can set a VI's data in that respect. I just cannot seem to InsertVI into multiple subpanels. Any suggestions? I haven't tried this specifically but I suspect that if you make your subVIs re-entrant it would work. Quote Link to comment
silmaril Posted September 23, 2009 Report Share Posted September 23, 2009 Ok had a thought and it worked The Front Panel:Open property is True when the VI is loaded in the subpanel False otherwise Easy! Problem sorted Cheers FP:Open only tells you if the front panel is open anywhere. This may be enough, if you only want to distinguish the two states "closed" and "open in subpanel". But what if you'd like to distinguish (1) "closed", (2) "open as separate window" and (3) "open in subpanel"? I just found a very interesting private VI property: Front Panel Window:OS window. This property returns 0 if there is no OS window for this VI (which is the cases for (1) and (3)). If the VI has it's own window, this property returns a number >0 (case (2)). In combination with FP:Open, this enables you to tell exactly what the state of the panel really is. 1 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.