From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

display warning message

Hello,

 

I'm using labview 2011 development vision.

I wonder how can I make an error control for the software, because in my software has a button called "Save Image" and when the user clicks on it, opens a window for the user to select where he wants to save the image but the window has two buttons: "Save" and "Cancel". If the user clicks the cancel button appears an error message.

How do I make the user click "Cancel" and the software to function normally again without having to cancel and re-initiation

 

Thank You.

0 Kudos
Message 1 of 2
(2,568 Views)

Use an explicit file dialog to get the file name from the user (set default name, pattern, browse option, etc appropriate for the image) and look for the "canceled" terminal or error output. If the users cancels the dialog, you will get a TRUE for the canceled boolean and an error at "error out".

Now use a case structure to skip reading the file if the dialog gets cancelled.

0 Kudos
Message 2 of 2
(2,560 Views)