01-03-2011 07:12 AM
Solved! Go to Solution.
01-03-2011 07:17 AM
01-03-2011 07:43 AM
Hi
Somewhere was wrong sorry, my fault 🙂
I used the function Read from spreadsheet file but when I pressed Cancel in file dialog I got ERROR 43, I know what is it, but i dont know how this problem solve. I would like get for example: one button dialog. I tried to use solving from link: http://forums.ni.com/t5/LabVIEW/How-to-prevent-error-message-by-using-quot-Rerad-Write-from-to/m-p/1... but it is only for the function write.
Sorry for so stupid question but im new to labview
Thx.
Tomas
01-03-2011 07:48 AM
Hi Tomas,
it makes no difference if it's a FileWrite or FileRead-function - the "user cancel" stays the same...
Have a look at the examples coming with LabVIEW. Then read the help for the SimpleErrorHandler. Then use a simple UnbundleByName to get the error state and code to call a CASE structure with your OneButtonDialog...
01-03-2011 08:33 AM
Thx for your help,
i have tried use your idea, unfortunately when I use the simple error handler then i can generate my own label but when i press continue then it show still the same eror 43 again and it is exactly what I dont want to see.
thx
Tomas.
01-03-2011 08:36 AM
01-03-2011 03:41 PM
pepis wrote:I used the function Read from spreadsheet file but when I pressed Cancel in file dialog I got ERROR 43, I know what is it, but i dont know how this problem solve.
The best way to handle this is to use an explicit file dialog. One output is the selected path that you should wire to your read function. Another output is a boolean that indicates if the dialog was cancelled. Use a case structure and do your read function only if the dialog was not cancelled.
02-02-2011 07:33 PM
The spreadsheet read and write vi's don't provide an error out connector.
02-02-2011 07:40 PM
@dj3 wrote:
The spreadsheet read and write vi's don't provide an error out connector.
How is this relevant to this thread? Are you replying to a specific post or just commenting in general?
02-03-2011 03:51 PM
Pepis is having the error 43 problem using the Read from spreadsheet vi. Someone is telling him to use the general error handler but that doesn't work as there is no error cluster available to the user. I just got around the problem after posting here by saving a custom copy of this vi and a custom copy of the "Read string from file" vi which is part of the "Read from spreadsheet". The "Read from string" vi contains a general error handler on which I then changed the "type of dialog" flag to zero which stops all error messages. Of course I could have given the custom vi's error clusters and used the applications error handler but that would have required a lot of retesting (and time).