LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 7: File not found occurs in 8.2 from transition of 4.1. Specifying the file in file dialog returns error although file is in the directory.

Copied a program from 4.1 to 8.2 recently and receive an error 7: File not found at open file+.vi.  The program is built so a file dialog will pop up and ask for the destination of the file.  Eventhough there is a file in the specified directory, an error is returned.  Running open file+.vi by itself returns no error with the same file designation.  Any clues?
0 Kudos
Message 1 of 2
(2,685 Views)
noviceak,

Welcome to the NI Discussion Forums.

I created a quick VI in LabVIEW 4.1 that displays a file dialog and then passes that file path to "Read Characters from File.vi" (which in turn calls Open File+.vi).  I then opened this file in LabVIEW 8.2 and ran it successfully (see code screenshot below).



When you say there is a file in the specified directory are you using the file dialog to browse to the directory or to select the specific file?  Open File+.vi expects the path to a file rather than a directory - that is C:\folder\file.txt rather than C:\folder.  You might also want to create an indicator or probe to see what path is being passed to Open File+ to ensure it is what you expect.

I feel like I should also say that in the days (years) inbetween LabVIEW 4.1 and 8.2 the file operation VIs have changed significantly.  While the old Open File+.vi still lives in vi.lib for compatibility purposes we no longer recommend using it for new applications.

I hope this helps and again, welcome to the community.

Regards,

Simon H
Applications Engineer
National Instruments
http://www.ni.com/support/

Message Edited by Simon H on 01-18-2007 08:01 PM

Message Edited by Simon H on 01-18-2007 08:03 PM

0 Kudos
Message 2 of 2
(2,668 Views)