From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Application builder with MATLAB script calling user-defined .m files not working

I am sorry, I don't get your point. Please specify more clearly.

Thank you

Sabih

0 Kudos
Message 11 of 12
(221 Views)

One common way to locate a file is to use the function that returns the current VI's path. This technique works well if you are trying to create a relative path to a LV file because the relative path will remain the same even inside an executable. The problem is that non-LV files can not go inside an executable. The solution then is to use the Application Directory function to establish your relative path. In the development environment the function returns the path to the directory where the project file is, in an executable it returns the path of where the executable is.

 

If you create a subdirectory called "scripts" in the project directory and a matching directory in the installed directory your application will be able to easily find the scripts no matter which environment you are running in.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 12 of 12
(206 Views)