cancel
Showing results for 
Search instead for 
Did you mean: 

How to prevent error message by using "Rerad/Write from/to spreadsheet file.vi" when pressing Cancel?

MichaGue_01
Member

How to prevent error message by using "Rerad/Write from/to spreadsheet file.vi" when pressing Cancel?

Hello,

 

I am using the "Rerad/Write from/to spreadsheet file.vi" and it works fine. But when I press "Cancel" in the datafile dialog, I have an error message "Fehler 43 ist bei Open File+.vi:File Dialog aufgetreten" because of the user abort.

 

Is there a possability to prevent this error message?

 

Best regards,

Michael

7 REPLIES 7
Thiago Bach
Member

Re: How to prevent error message by using "Rerad/Write from/to spreadsheet file.vi" when pressing Cancel?

Good morning!

If you link the error out from the read/write vi to a indicator (right click-> create-> indicator) you dont get a error message.

ok?

GruBe

MichaGue_01
Member

Re: How to prevent error message by using "Rerad/Write from/to spreadsheet file.vi" when pressing Cancel?

Hello,

 

the VIs ("Write to spreassheet file.vi" and "Read from spreadsheet file.vi") have no error out. Linking an indicator at the error out from the read/write vi is not possible, because the VIs ("Write to spreassheet file.vi" and "Read from spreadsheet file.vi") are protected, so I can't change anything inside the VIs.

 

Any other ideas?

 

Thanks a lot.

 

Best regards,

Michael

Ulli27
Member

Re: How to prevent error message by using "Rerad/Write from/to spreadsheet file.vi" when pressing Cancel?

Hi,

 

you could use an explicit file dialog instead of leaving the path input empty. Then you are able to check for a valid path before calling the spreadsheet VI.

 

\Ulli.

 

_Faust
Member

Re: How to prevent error message by using "Rerad/Write from/to spreadsheet file.vi" when pressing Cancel?

I modified those VIs, and made an error output cluster in there myself, because I had identical problems. On the error out I either connect an indicator or a case.

 

Just double click that 'read from spreadsheet vi' when its on the block diagram, look for the 'general error handler.vi', and replace it by an indicator. Switch to the front panel, right click the VI icon -in the right top-, select show connector, and connect that error cluster to where you want it to be.

Cadbury
Member

Re: How to prevent error message by using "Rerad/Write from/to spreadsheet file.vi" when pressing Cancel?

Message contains an image

If the path is empty dont allow the spreadsheet file to read or write.

 

17207i18D2419D52E7A0A8

_Faust
Member

Re: How to prevent error message by using "Rerad/Write from/to spreadsheet file.vi" when pressing Cancel?

that works, but sometimes I have encountered cases where a dialog allowed you to pick a file, when it was read later on. In the mean time the user could move or delete the file, which of course happened -against my anticipation Smiley Happy -

I'd like to use the 'valid file or folder' VI to check if its still there.

Highlighted
Cadbury
Member

Re: How to prevent error message by using "Rerad/Write from/to spreadsheet file.vi" when pressing Cancel?

You can check it in a particular folder whether it is valid file or not and return back.