LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

closing the VI after execution under conditions

Hello.

 

In my program i have a button that opens new window to show graph from saved file.

In the new window there is i dialog. If user chooses file to open, then the graph is presented in the VI.

I want to make, that if the user cancel the dialog box of choosing file, the new window will close.

 

What is the solution?

 

Thanks 

0 Kudos
Message 1 of 4
(2,825 Views)

Hi Tacchi,

 

usually a subVI's FP is closed when the subVI exits (when the VI properties are set properly, OpenOnCall and CloseAfterwards).

The other option would be a property node of the VI to close the FP programmatically.

 

When you use the standard FileDialog function you should also check the error output for an "User Cancel" error to recognize  a cancel operation of the user...

Message Edited by GerdW on 03-10-2010 03:37 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(2,814 Views)

GerdW wrote:

Hi Tacchi,

 

 

The other option would be a property node of the VI to close the FP programmatically.

 

Message Edited by GerdW on 03-10-2010 03:37 PM


Hello.
That is what i was thinking about. But where I can find the VI property node?
 
Thanks 

 

0 Kudos
Message 3 of 4
(2,802 Views)

place a property node (general)  (you will find this under Application Control in functions palette)

 

right click on that.  go to select class-->VI server-->VI-->VI

 

 Then left click on the property, FrontPanel window-->Open

 

then right click on the node and select " change all to write".

Anil Punnam
CLD
LV 2012, TestStand 4.2..........
Message 4 of 4
(2,791 Views)