LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ERROR "L'erreur 7 s'est produite à : Open File+.vi:Open File"

Hi,

 

i created an executable for a project, it was created correctly, also the installation is done; but after lauching *.exe, i have an error wich occurs;

photo attached.

 

Best Regards,

Aymane

0 Kudos
Message 1 of 10
(2,447 Views)

Hi Aymane,

 

error 7 is "file not found": did you check if the file path is valid? (Did you check that also in the executable?)

 

Generic advice as you didn't attach any code: Don't use "Current VI's path" inside the exe!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 10
(2,442 Views)

Hi Gred,

 

i have the same project running on the same machine with the file path, but it doesn't wotk with the insttaler/.exe;

 

i didn't understand your msg ''Don't use "Current VI's path" inside the exe!"!

 

Best Regards,

Aymane

0 Kudos
Message 3 of 10
(2,424 Views)

He means don't use this node:

 

FireFist-Redhawk_0-1594996072498.png

 

Redhawk
Test Engineer at Moog Inc.

Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.

0 Kudos
Message 4 of 10
(2,414 Views)

Hi Amyane,

 

inside an executable the "Current VI's path" contains one more folder level due to the executable: this will bite you when trying to build path to files!

 

Use the "Application directory" constant instead!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 10
(2,404 Views)

Should be changed by application directory? and after that you have recreate the installer?

 

aymaneLAK_0-1594998580655.png

 

0 Kudos
Message 6 of 10
(2,401 Views)

Hi Aymane,

 


@aymaneLAK wrote:

Should be changed by application directory? and after that you have recreate the installer?


Yes.

And yes: when you change the code then you need to recompile…

(Don't forget to test/debug your code in between those two steps!)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 10
(2,384 Views)

Hi Gerd,

 

i tested to replace Current VI's path with Application directory, but it doesn't work in test/debug?

 

aymaneLAK_0-1595236862842.png

 

Best Regards,

Aymane

 

0 Kudos
Message 8 of 10
(2,269 Views)

Hi Aymane,

 

which file do you are try to access? What is the full path of that file?

Which path do you create within your VI/executable?

Did you compare both?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 10
(2,262 Views)

Hi Gerd, 

 

Yes, after comparing the two methode, a directory name was missing in the path;

 

best Regards,

Aymane

0 Kudos
Message 10 of 10
(2,248 Views)