LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get Target File name from application builder

Solved!
Go to solution

Hello,

 

How do I programmatically get the target file name from the application builder in LabVIEW

 

Capture.PNG

 

Thanks

 

Dan Shangraw, P.E.


   

0 Kudos
Message 1 of 4
(3,582 Views)

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

0 Kudos
Message 2 of 4
(3,568 Views)
Solution
Accepted by topic author ASTDan

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.

 

Snap1.png

 

You can generate the template from the Application builder

 

Snap19.png

 

mcduff

Message 3 of 4
(3,563 Views)

Are you talking about getting it programmatically via property nodes?

https://stackoverflow.com/questions/34133098/get-build-specifications-list-and-other-properties

0 Kudos
Message 4 of 4
(3,559 Views)