LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to trigger an action when OK button in Dialog Box is clicked

In my program I collect data from analog inputs and store that in a binary file. My problem is I need to trigger another action when ever the user gives the file name to store the data and clicks the OK Button inside the Dialog box. Is there any way I can get the boolean signal when ever the OK button is pressed?
0 Kudos
Message 1 of 2
(2,839 Views)
You can't get the "OK Pressed" directly, but you can check the error output. An error code 43 is generated when a user hits cancel in the dialog box.

If you're using a vi from the File I/O pallet (like "Write to SGL File"), they unfortunately don't have the error cluster wired as an output. They do have an output of the selected path. This is set to "Not A Path" if the user selects Cancel. Test the output path - if it is equal to the "Not A Path" constant, then the user hit cancel.

Tim
0 Kudos
Message 2 of 2
(2,839 Views)