03-07-2019 09:40 AM
Hello,
How do I programmatically get the target file name from the application builder in LabVIEW
Thanks
Solved! Go to Solution.
03-07-2019 10:05 AM
As far as I can determine, you don't "get" it, you "set" it when you create the Build Specification in the Project. It seems, by default, to be (more-or-less) the same name as the Build Spec. It looks like someone added "Rev 1.6" to your Build Spec property, which I assume they did "by hand".
Note that LabVIEW does provide a function to set and get the Build Specification Version (e.g. 1.0.3.1059) that is part of the Build Spec. As I've noted in an Idea Exchange, I tried using a Pre-Build Action to, at Build Time, programmatically set the last part ("Build") to the SVN Revision Number, but discovered (and NI confirmed) that when the Pre-Build Action runs (and "sets" the Version Number), LabVIEW has already cached the (former) Version number, so you need to "Set Once, Build Twice" for it to work. I've asked to make the "Pre-Build Action" run before the Build, but so far, this Idea has not gotten sufficient "Kudos" for NI to fix this.
I now do my Builds another way that allows the Build Spec to be updated with the SVN Version Number before the Build (i.e. a true "Pre-Build Action").
Bob Schor
03-07-2019 10:34 AM
Use the "Post Build Action" VI. It has a template that you need to follow. I use it to modify the INI file created, but you should be able to use to find the exe file.
Below I am looking for the INI file, but you can easily change that to the EXE file.
You can generate the template from the Application builder
mcduff
03-07-2019 10:51 AM
Are you talking about getting it programmatically via property nodes?
https://stackoverflow.com/questions/34133098/get-build-specifications-list-and-other-properties