LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems deploying an app using a loader

I have been trying to use the loader method described in several posts to run an application.  Our development directory structure consists of many subdirectories (eg. common, utility, dll) and this app. has many vi’s interspersed within all these directories.  This app has about 80 sub-vi’s and a couple of vendor dll’s that it runs.  I save the app as an “Application Distribution”.  In the loader I pass the complete path to the main VI within the llb.  When I create the loader executable I also define the main VI as the top level vi from within the llb.  The loader executable that is created runs fine from within the original directory but once I move it to the root directory it does not work.  It comes back with a “Error 7 Occurred at Open File+.vi: Open File”.  At this point it was trying to open an INI file.  My questions: 1) Should I pass the path of the llb to the loader instead of the main vi? 2) What can I do to either the loader or vi to be able to run the loader from any directory other than where my main vi resides? 3) Where should I place my INI file so that I do not get the Error 7?  Any help would be appreciated.  Thank you.

0 Kudos
Message 1 of 4
(2,779 Views)

The answer to your question really depends on how you are opening this INI file. Are you giving LabVIEW an absolute file path to the INI file or a relative file path with respect to a VI? If you are using a relative file path, then recall that building a VI into an executable adds an additional branch to the file path -- instead of ...\myapp.vi, the file path to the VI becomes ...\myapp.exe\myapp.vi. If you are using an absolute file path, then this will obviously only work when the file is located in that exact location.

Kind Regards,

E. Sulzer
Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(2,758 Views)
I am using a relative path...but does this matter if the only executable is the loader?  In method #1 the loader is calling main.vi from the app development directory sturcture and in method #2 the loader is calling main.vi from within main.llb. 
0 Kudos
Message 3 of 4
(2,752 Views)
LLBs have the same file path behavior as executables. The file path of your VI in case1 will be ...\main.vi, whereas the file path of your VI in case 2 will be ...\main.llb\main.vi. Are you accounting for this difference in your relative path?
E. Sulzer
Applications Engineer
National Instruments
0 Kudos
Message 4 of 4
(2,735 Views)