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.

LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
sth

Automatically updated version/build numbers: Exposing them programmatically for Help/About...menu item or Panel title

Status: New

This idea was posted years ago and declined for lack of interest  (it got 6 out of 7 necessary, but I would have been the 7th!).  I would like to bring it back, I would like my application to have access to it's own version number.  In fact you can open the project programatically and see some build properties but not that one.  I can then grab the version from the build properties and set the default values on my FPGA code before compiling.

 

I was trying to make a pre-build VI that would look at the build properties and copy the version data into a control.  Can't be done.  I find this very useful to make sure that my RT system and my FPGA code have the correct versions.

 

Same as with an about box, or version checking for compatibility.

 

The previous thread suggested a routine in the FileVersion.llb but that seems to only be available in a single platform.  Not useful for RT linux or Mac.  The version is not available until the executable is built which does not work for FPGA.

 

At the moment my only recourse is to hand copy the version from the build properties and then set those as a series of 4 integers on the FP.  (Then select them all and set their values to default, hence the other suggestion about right click)

LabVIEW ChampionLabVIEW Channel Wires

12 Comments
sth
Trusted Enthusiast Trusted Enthusiast
Trusted Enthusiast

That is why I was looking for a way to be cross platform of reading the build spec which has the tagset (?) for the version number and then setting the defaults of a global or a FP variable with that data that can be accessed in either the application or the VI.  This version number would be set by a VI that runs "pre-build".

 

This avoids the very different version numbering for runtime and built applications, it is cross platform, and all G goodness.

LabVIEW ChampionLabVIEW Channel Wires

Hooovahh
Proven Zealot

I kudo'd because I want this.  But I thought I would share my hacky work around.  I have a subVI that is a string constant which is the version.  As part of my Post-Build action, it will use this VI and create a text file next to the .rtexe file that is Version.txt with the string contents in it.  In my main VI I can also have it call this VI to also display the version in a log, or remote webpage as a UI.

 

I do need to remember to update the string constant in this VI when I build.  I'm guessing a Pre-build action could be used to set it or prompt the user.