06-23-2010 01:22 AM
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
06-23-2010 01:41 AM
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
06-23-2010 04:15 AM
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
06-23-2010 04:26 AM
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.
06-23-2010 06:14 AM - edited 06-23-2010 06:17 AM
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.
06-23-2010 06:27 AM
If the path is empty dont allow the spreadsheet file to read or write.
06-23-2010 06:35 AM
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 🙂 -
I'd like to use the 'valid file or folder' VI to check if its still there.
06-23-2010 06:40 AM
You can check it in a particular folder whether it is valid file or not and return back.