LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
beuvink

Include filename in error code for file handling functions

Status: New

In vi.lib\Utility\file.llb the 'file open+.vi' throws an error when a file can't be opened. It doesn't tell which file it can't open.

 

One of the strenghts of LV is the source string in the error cluster that can be used to include a lot of extra information. For example which file couldn't be opened.

 

The change can be very simple, just add the file into the source string, also see attached file:

beuvink_0-1652104974240.png

This is probably true for some other files here as well.

 

(also checking out these files... would be nice if they are updated to some newer standards... still some very old styling here...)

 

Some background: https://forums.ni.com/t5/LabVIEW/Looking-for-feedback-on-the-Carya-PDF-toolkit/m-p/4229342#M1228046

 

 

 

 

 

---

25+ years long fan of LabVIEW. Move to Emerson looks to be for the better! See the last posts in subscription model thread.
2 Comments
crossrulz
Knight of NI

That VI is really only there for legacy code (as in pre-LabVIEW 7).  There is a reason it is not in the palettes.  You should just use the Open/Create/Replace File primitive, which actually does return the file that failed to open in the error string.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
beuvink
Member

That's why it looked so old style :).

 

It was used as a sub-vi in a 3rd party library.and gave me ~2 hours of work to track down the missing file... as this file was only missing on a system running a run-time version.. and the file was also not really used... and I only got a error dialog as it was triggered by 'read characters from files.vi' from the old days as well.

 

So even this old, it can still give some troubles. Not an urgent change imho, but would be nice if this 5 minutes change could be included in a new LV version.

---

25+ years long fan of LabVIEW. Move to Emerson looks to be for the better! See the last posts in subscription model thread.