LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Deleting a file from harddisk problem

Hey!

 

I'm logging data from a UV detector into a txt file. After the measurement has stopped, the user gets a file dialog to store the file. If the users presses okay the temporary file gets moved to the new path. If he aborts the file should be deleted.

See the to images for the program code.

 

Moving the file works without any problems.

If I'm pressing abort I get the error message (#43) that the user has cancelled the deletion.

 

I'm using LabVIEW 8.5.1

 

Where is my mistake?

 

Thanks for your help!

 

Christoph

 

 

Download All
0 Kudos
Message 1 of 4
(2,448 Views)

Hi Christoph,

 

The file dialog returns an error (43, user cancelled) if the user clicks 'Cancel'. Because the delete file function sees an error at the input it doesn't delete the file.

You'll have to clear (or just not wire) the error cluster.

 

Hope this helps,

Daniel

 

0 Kudos
Message 2 of 4
(2,438 Views)

Hey!

 

Thank you, that was the mistake. If I do not wire the error cluster it's working. But I get the error message as soon as I press the "Abort" key. Is there a way to cirumvent this without displaying the error?

Or do I have to display the error but hide the display on the frontpanel?

 

Thanks.

 

Christoph

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

I guess you have automatic error handling active. Deactivate it in the VI properties (in the execution category).

 

0 Kudos
Message 4 of 4
(2,424 Views)