jgcode Posted July 23, 2010 Report Share Posted July 23, 2010 [cross-posted to ni.com] Howdy ! I have run into the following issue when creating a tool for LabVIEW that continually runs in the background (daemon/process VI): By default, LabVIEW shows the GSW when all other files (project, VIs etc...) are closed. However with the process running in the background, it does not show the GSW! Has anyone run into the issue before? Is there a way to set LabVIEW to 'ignore' my Tool and get the GSW to show normally? The VI is running in the NI.LV.Editor application instance (the Tool is launched by Quick Drop). Cheers -JG Quote Link to comment
Ton Plomp Posted July 24, 2010 Report Share Posted July 24, 2010 By default, LabVIEW shows the GSW when all other files (project, VIs etc...) are closed. However with the process running in the background, it does not show the GSW! You could explore some of the application properties, if I'm not mistaken there's a 'private' or 'system' property that should make it invisible for the GSW. Or you could launch the GSW. There is a menu launch token for the GSW that loads it into the front. Try to get Christina into this discussion, since she wrote a lot of code for the GSW. Ton 1 Quote Link to comment
jgcode Posted July 24, 2010 Author Report Share Posted July 24, 2010 You could explore some of the application properties, if I'm not mistaken there's a 'private' or 'system' property that should make it invisible for the GSW. Or you could launch the GSW. There is a menu launch token for the GSW that loads it into the front. Try to get Christina into this discussion, since she wrote a lot of code for the GSW. Ton Thanks Ton, I don't want to manage showing the GSW etc, I am hoping it can be all handled by LabVIEW by flagging that VI to be ignored or something similar. I will check out the app props, in the meantime I have contacted Christina. Cheers -JG Quote Link to comment
Christina Rogers Posted July 25, 2010 Report Share Posted July 25, 2010 The Getting Started Window will not reappear if there are any open or hidden LabVIEW windows. If your background-running VI never opens its front panel, or closes it using the FP.Close method, it should not prevent the return of the GSW. If your VI closes its window and the GSW is still failing to appear, you may have found a bug where LabVIEW is not checking the window list at a time that it should. If that's the case, PM me and we'll investigate. 1 Quote Link to comment
jgcode Posted July 25, 2010 Author Report Share Posted July 25, 2010 The Getting Started Window will not reappear if there are any open or hidden LabVIEW windows. If your background-running VI never opens its front panel, or closes it using the FP.Close method, it should not prevent the return of the GSW. If your VI closes its window and the GSW is still failing to appear, you may have found a bug where LabVIEW is not checking the window list at a time that it should. If that's the case, PM me and we'll investigate. Hi Christina, Thanks for your reply. That is good to know the exact criteria - which is what the issue would be here: My process does have a GUI so the FP can be opened, therefore I use the FP.Hidden state to hide the window in-between calls. (I was thinking it may be faster to load and I was also experiencing some issues using FP.Close and memory that I have since fixed) Anyways, I have changed this around now so the FP.Close is called each time and now the GSW window pops up with the process still running in the background! Thanks heaps!! Quote Link to comment
Christina Rogers Posted July 26, 2010 Report Share Posted July 26, 2010 Thanks heaps!! You're welcome! Glad I could help. Quote Link to comment
Liang Posted February 28, 2011 Report Share Posted February 28, 2011 Hi Jgcode, Have you resolved your problem? I'm having the same question you are. Could you help me on this? My VI has FP,and want to launch GSW while only my VI running. thanks a lot Quote Link to comment
jgcode Posted February 28, 2011 Author Report Share Posted February 28, 2011 Hi unCLAD Not sure I can contribute any more as everything is mentioned above - you will need to close the FP in order for the GSW to appear. Cheers -JG Quote Link to comment
Liang Posted February 28, 2011 Report Share Posted February 28, 2011 Hi Jgcode, I try to use "Open VI as System", try to add my VI to other application context. But it do not work. If this can be achieved by FP.Close only, I wonder to know: 1. How can I know if it's time to CLOSE? 2. When to re-open the FP of my VI? thanks a lot Quote Link to comment
Rolf Kalbermatter Posted February 28, 2011 Report Share Posted February 28, 2011 Hi Jgcode, I try to use "Open VI as System", try to add my VI to other application context. But it do not work. If this can be achieved by FP.Close only, I wonder to know: 1. How can I know if it's time to CLOSE? 2. When to re-open the FP of my VI? thanks a lot It's your application, at least I would hope that, so the answer to both questions can only be given by you. The only thing we can tell you are generic advices or in other words: 1) It's time to close your VI FP when you don't have to show anything to the user or don't have to get information from them anymore. 2) Invert number 1) and you have the answer to that as well. Quote Link to comment
Liang Posted February 28, 2011 Report Share Posted February 28, 2011 Hi Rolfk, Thanks for your reply. Maybe I do not descript my question well. I really do not want to close FP, but to launch GSW I must. And I cannot figure out if there is only my VI running (to close) or GSW only (to open). Quote Link to comment
jgcode Posted February 28, 2011 Author Report Share Posted February 28, 2011 Hi UnCLAD If LabVIEW is configured to do so GSW will open when no other VI's FP are open (I.e. all closed). Are you looking for a programmatic way to show GSW? I don't think that is possible. Maybe you could suggest it on the IE?? Quote Link to comment
Liang Posted March 1, 2011 Report Share Posted March 1, 2011 Hi UnCLAD If LabVIEW is configured to do so GSW will open when no other VI's FP are open (I.e. all closed). Are you looking for a programmatic way to show GSW? I don't think that is possible. Maybe you could suggest it on the IE?? Hi Jgcode, I do really want to launch GSW programmatic. I can launch GSW by VI server without close FP , but it's difficult to figure out when to launch. Thanks a lot Quote Link to comment
jgcode Posted March 1, 2011 Author Report Share Posted March 1, 2011 Ok, well if you can launch GSW programmatically that's cool (I never checked). But I concur with Rolf (above) regarding your application. Quote Link to comment
Francois Normandin Posted March 1, 2011 Report Share Posted March 1, 2011 You simply can't. GSW is a private VI in the Getting Started library (GettingStartedWindow.lvlib). The only public VIs from that library are "getting_started.vi" and it will fail if you have any FPs opened... and Close_GSW. There are two options here: 1- Idea exchange, as suggested by Jon. 2- Contact Christina Rogers (Eyes on VIs) and ask her for a quick fix, if she (or NI?) is willing to accomodate your request. Quote Link to comment
Liang Posted March 1, 2011 Report Share Posted March 1, 2011 (edited) You simply can't. GSW is a private VI in the Getting Started library (GettingStartedWindow.lvlib). The only public VIs from that library are "getting_started.vi" and it will fail if you have any FPs opened... and Close_GSW. There are two options here: 1- Idea exchange, as suggested by Jon. 2- Contact Christina Rogers (Eyes on VIs) and ask her for a quick fix, if she (or NI?) is willing to accomodate your request. Yes, it cannot operate correctly even I launch the GSW from my tool by calling GSW VI. But by using the invoke node of "User Interaction.Invoke Menu Item" and setting the ItemTag to "APP_VIEW_GETTING_STARTED" to launch GSW can be operated correctly (GSW can be closed automatically after new...). In LabVIEW, you can launch GSW from menu launch when you've already opened a VI. So I think this can work correctly. Edited March 1, 2011 by unCLAD 1 Quote Link to comment
Rolf Kalbermatter Posted March 1, 2011 Report Share Posted March 1, 2011 Yes, it cannot operate correctly even I launch the GSW from my tool by calling GSW VI. But by using the invoke node of "User Interaction.Invoke Menu Item" and setting the ItemTag to "APP_VIEW_GETTING_STARTED" to launch GSW can be operated correctly (GSW can be closed automatically after new...). In LabVIEW, you can launch GSW from menu launch when you've already opened a VI. So I think this can work correctly. So you have found a solution but find it to complicated? Or what is the problem you still have? Quote Link to comment
Liang Posted March 1, 2011 Report Share Posted March 1, 2011 So you have found a solution but find it to complicated? Or what is the problem you still have? By discussing here, I got alot of innovations to accomplish it. Now it's difficult to judge if there is only my VI running. There are VI windows and non-VI windows (such as lvlib, lvproj). And in my VI, it use other VI's reference. I'm confused. Quote Link to comment
jgcode Posted March 1, 2011 Author Report Share Posted March 1, 2011 You are not the only one Quote Link to comment
Liang Posted March 1, 2011 Report Share Posted March 1, 2011 My VI is launched from menu, so it will be add to NI.LV.Dialog context. Before I invoke GSW by item tag, I will check if there are FP opened VIs, lvlib and lvproj in Application Instance context. What confused me is GSW can be invoked correctly at the first time only. After the first invoke, I've checked there are no FP opened VIs, lvlib and lvproj. 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.