10-26-2015 10:51 AM
Hi,
I've written an untility that will go through all VI and CTL files in a directory and write / update the description of all of the files. This works great to add copyright information and company information, etc. The program runs fine and updates all target files when it runs in the development mode. If I've built it into an exe though everything appears to work, but it doesn't. I've put indicators on the "Warnings" output and the "Get VI Version" (see the attached code); there are no warnings, the vi versions are correct, and the path to save to is correct, unfortunately the updated files are not saved.
Attached is a simplified version of the code at the heart of the matter. This has a calling VI that sends in an array of files to be updated, the top one is "popped" off and processed (there is a LOT more that gets added into the description than what is shown here, but that all works fine as the string out shows the proper updated description), and then the process checks what LV version the file being updated is and saves it to the proper version. As I said this all works perfectly when run as a VI, but when I compile it to an exe, although it appears to work, the new, updated files are not saved.
The attached file is in LV 2014.
Any ideas?
Thanks,
Dan
Solved! Go to Solution.
10-26-2015 11:03 AM
An executable runs in the Run Time Engine. The RTE does not have the capability of saving a VI. The only thing here that I would say does not make sense is that the Save VI should thow an error stating that it does not work in an executable.
10-26-2015 11:08 AM
That's what I was afraid of. Bummer.
I do agree, the save vi method should throw an error if it used in an exe.
It sure would have been nice to distribute the program as an exe though.
Thanks for the answer.
Dan