Discussions au sujet des autres produits NI

annuler
Affichage des résultats de 
Rechercher plutôt 
Vouliez-vous dire : 

How to get version info

Hi,
 
I would like to display the version number of my application.
Since LabView 8, I can build my application and set the version number.
How to get this value into my application?
 
Regards
 
Alain
0 Compliments
Message 1 sur 2
3 402 Visites
Hi

To see the version number of your application you can right click on the executable file (the .exe file) and select 'Properties'. Under 'Properties' you can find the file version number and description under the 'Version' tab.

If you want to display the version number in your program you could use the .NET invoke node and property node. The System.Diagnostics.FileVersionInfo method of the .NET class will get the required information.

The attached example VI for LabVIEW 8 shows you how to set it up. Remember this will only work if you cut and paste the code into your program and build an executable. If you try to run the VI in LabVIEW it will give you an error.

To try to get around this you can use the 'Application->Kind' property in the property node for 'This Application'. You could wire the output of the property node to a case structure and paste the code attached in the 'Run Time System' case.

Hope this helped.

Regards

Richard Keromen

0 Compliments
Message 2 sur 2
3 399 Visites