From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
07-31-2012 05:23 PM
Hi,
I was trying to build a stand alone executable from my Labview project and I was able to do it successfully. Now I would like to include a few external .txt files in the installer. Those .txt files have parameters/constants that will be used by the program, and my program needs to load/read them when running. For now I have to manually copy/paste them into the target machine, but I really hope the installer can do it automatically. I see there is a "data" folder in the installer, and that's where I hope those .txt files can be added into.
How can I do it? Can anyone give me some suggestions? Thanks!
Rgds
Harry
Solved! Go to Solution.
07-31-2012 09:06 PM
Hi Harry,
In the Source Files catagory of the App Builder Properties you should add the text files to the Always Included section. You can simply include the folder if the files are all in the same location. When you build the application the files will be in the Data folder, and also when you create the Installer.
David.
08-01-2012 03:57 AM
Please note that in order to follow Davids recommendations, the txt-files have to be "managed" by the LV project. I think that you miss that part.
hope this helps,
Norbert
08-01-2012 06:15 AM - edited 08-01-2012 06:15 AM
Yes, the files are included in Project Explorer. Thanks for spotting the omission Norbert.
08-01-2012 08:34 AM
Hello David,
Thanks for your reply. I tried to find where I can "add" file to my project but did not get any luck. Intuitively I thought under "Project -> Add to project" should be where I include external files. However it only allows me to add something that LV handles, like VIs or new projects. Am I looking the wrong place? Can you point out for me how I can get the .txt files been managed by LV project? Thanks a lot!
Rgds,
Harry
08-01-2012 08:37 AM
Norbert,
Thanks for your reply. I tried to what you and David suggested but I cannot find where to add those .txt files so they can be managed by LV project. Can you advise me a bit more in detail how to do it? Thanks!
Rgds,
Harry
08-01-2012 08:40 AM
Harry,
simply select "Add File" in the project (right click menu in your target). Browse to the textfile. I suggest you to create virtual folders in your project in order to have a clean organization of source -, configuration - and documentation files.
hope this helps,
Norbert
08-01-2012 08:54 AM - edited 08-01-2012 08:56 AM
Norbert,
I could not find "Add file" when right clicking the project. See attached image please. Under "Project" I do have a "Add to project" but there is no option for external files. I did not find "Source" location either.
What did i do wrong? Is there any version requirement here? I have a 2010 base version. Thanks for your help.
Rgds,
Harry
08-01-2012 08:56 AM
Right click on the target within the project. In your case, this would be "My Computer".
Norbert
08-01-2012 09:19 AM
Norbert,
I got it. Thanks a lot!
Only one thing I noticed is that those files will be put together with the Source file, instead of in the "data" sub folder. Seems only the files under "Dependancies" will be added to the "data" folder, and dependency is automatically done by LV. The reason I notice this is because I also need to include a few .dll files (my project call some Fortran dll which requires use of a few external dll since the target machine does not have Fortran complier installed), and those files need to be in the "data" folder... Would you have any idea how to put files under "Dependencies" in project tree?
Rgds,
Harry