jgarciallamas Posted December 22, 2006 Report Share Posted December 22, 2006 Hi folks, Just a question related to an vi, which calls at the same time other vi's. The case is that I'd like to close Labview when the main vi finishes its execution so for this purpose I use "Quit Labview" vi under Application Control palette. At this point when Labview tries to close itself it is going to ask you if you want to save not only the vi but also the sub vi's so how can I manage to say Labview that I don Quote Link to comment
jridpath Posted December 23, 2006 Report Share Posted December 23, 2006 Hi Jose, Well I can tell you why the code you posted is not going to work. The "Save a Copy" property on the invoke node is for saving a copy to a new file name, and it is defaulted to false anyway. I am still a beginner, but I would think the best way would be to call your sub VIs using a Call By Reference Node and to use a Close Reference VI to close it before executing the Quit VI. When you close the reference to the sub VI it will not prompt you for saving changes. Take a look at the "Dynamic Load Example.vi" that ships with LabVIEW. John Ridpath Quote Link to comment
Mellroth Posted December 27, 2006 Report Share Posted December 27, 2006 At this point when Labview tries to close itself it is going to ask you if you want to save not only the vi but also the sub vi's so how can I manage to say Labview that I don Quote Link to comment
Omar Mussa Posted December 27, 2006 Report Share Posted December 27, 2006 Hi,are you speaking about closing dynamic or static SubVIs? If you are speaking about dynamic subVIs, then do as John suggested, i.e. call the "Close VI reference" on all opened references, but do it after you have closed all open frontpanels. If you don't close the front panels first, the VIs will stay in memory, causing the save dialog to appear when your application exits. Then the question is why you don't want to save these VIs? A VI that contains changes are loaded with FrontPanel/BlockDiagram and are then recompiled, i.e. consumes much more memory and takes longer to load. If you have many VIs with changes, the main VI loads much slower. /J As you are running from the Development Environment, you may want to ask yourself: is the end user also running from the Development Environment or are they going to be running from an EXE? If the answer is EXE, you shouldn't really have to care bc the dialogs will not appear. If you are going to be running from the development environment, an easy way to prevent the dialogs is to make all of your VIs 'Read Only' AND set the LabVIEW Options to "Treat Read Only VIs as Locked" And "Do not save automatic changes" to checked. Quote Link to comment
Mellroth Posted December 27, 2006 Report Share Posted December 27, 2006 If you are going to be running from the development environment, an easy way to prevent the dialogs is to make all of your VIs 'Read Only' AND set the LabVIEW Options to "Treat Read Only VIs as Locked" And "Do not save automatic changes" to checked. Good point, you are right that this is the easiest way. But, you would have to accept the same settings for all VIs/projects, and you must also take into account that moving between computers also involves setting the right checkboxes in the LabVIEW options. I still feel that the main question is why the save-dialog should be supressed at all? /J Quote Link to comment
jgarciallamas Posted December 27, 2006 Author Report Share Posted December 27, 2006 Hi all of you and thanks for your feedback, sorry for the delay, you know special days. Related to my post I have things to add, maybe my first one was a little bit caotic :thumbdown: , anyway my main vi, which includes several sub vi's will be an application(.exe file) which: 1. It'll be launched by Windows at night. 2. This vi will perform some tasks. 3. and it'll close automatically. (Quit Labview vi) at this point I don 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.