LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 43 occured by pressing cancel

When I use the cancel button on one of the vi's which can write or read data I get an error 43 (is also written in the help file). What can I do to make sure I will not get this messagebox with the error when I press cancel.
Thank you for you help.
0 Kudos
Message 1 of 5
(3,119 Views)
Error 43 is "Operation Cancelled By User" so if you don't want to see the error, only call the read and write VIs if you really want to read and write data! You could perhaps have your two-button dialog box asking the user if they want to perform a read/write operation, then wire the boolean output of that to a case statement which contains the data operation within the "true" case.
0 Kudos
Message 2 of 5
(3,119 Views)
First thank you for your answer.
But about the answer, if the user presses the button that says perform read/write operation and then changes his mind there will be still a popup with the error 43.
To make my case clearer. I want to use the VI to let the user save or load some settings.
0 Kudos
Message 3 of 5
(3,119 Views)
In that case, a workaround would be to modify the built-in read/write VIs that you are using. Double click on them to open them up, and look for the Error Handler VI somewhere near the end of the dataflow. You can either remove this, which would result in no error reporting at all, or unbundle the error cluster and feed the "code" value into the selector for a case statement. Have a case for value 43 which outputs a "no error" (eg. create a standard Error In control, right-click on it on the block diagram and choose "Change to Constant") and make the other (default) case simply a feed-through of the original error cluster wire.

Make sure you save the modified VIs in a different location, otherwise you'll overwrite the ones that came with LabVIEW
!
0 Kudos
Message 4 of 5
(3,119 Views)
Thank you very much for the advice. I think that should work.
0 Kudos
Message 5 of 5
(3,119 Views)