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

cancel
Showing results for 
Search instead for 
Did you mean: 

Application builder. How to automatically put the build version number on the title bar on the window of main VI?

Hi,

 

Exactly as in the title.

 

What needs to be done to populate each time when application is build (exe) the current build version number?

 

Can it be done as one of pre-build actions?

 

K.

0 Kudos
Message 1 of 6
(3,902 Views)

I usually stick this beast in my apps to populate the banner info as seen here https://forums.ni.com/t5/LabVIEW/Community-Nugget-Series-Application-Development-Installment-2/td-p/...

App Kind AE_BD.png

 

This pulls the build version right out of the app and pervents me from forgetting to update that silly BD constant before each build


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 6
(3,895 Views)

To extend Jeffs post: I've recently found out about <LabVIEW Folder>\vi.lib\Platform\fileVersionInfo.llb . There are codes which allows you to get file version without using .NET. This can be helpful, if you've got problems with .net libraries, which I've recently had.

Message 3 of 6
(3,868 Views)

Ah.... Just realized that you wanted to display that version information in the title bar.  So the preceding clip didn't quite get you there.  Once you get the string try something like this.  Note the title bar:

Capture.PNG


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 6
(3,862 Views)

What I wanted was the App Builder to put the info about version immediately during the build.

 

The first piece of code you posted do the job, thank you for that. Of course I was aware about the second piece you sent. 🙂

 

However, I thought that I could achieve my aim using only builder with its Pre-build actions without the need of adding the code to the app.

 

I check what PiDi sent.

0 Kudos
Message 5 of 6
(3,832 Views)

It would be nice to somehow automatically update the installer build so that when you run "setup" it will tell you the version it is gonig to install without running the installer first.. currently there is no automated way I have found of documenting this, so when you have a large build folder, sometimes its hard to know what verison the install/setup is for..

QFang
-------------
CLD LabVIEW 7.1 to 2016
0 Kudos
Message 6 of 6
(3,722 Views)