From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

How do I get the version of labview a VI was saved in at runtime?

I want to get the version of labview that a VI was saved in so i can display it on the front panel.
0 Kudos
Message 1 of 8
(3,141 Views)
If you want the LabVIEW version, you use a property node. Right click and Select Class>VI Server>Application and then select Properties>Application>Version Number. This will return a string. If you want the revision number of a VI, its Select Class>VI Server>VI and then select Properties>History>Revision Number.
Message 2 of 8
(3,138 Views)
Dennis,

Just short note. Revision Number of VI is available in Development Mode only. It is not available in Run-Time Engine (in builded application will be always returned zero).

with best regards...
0 Kudos
Message 3 of 8
(3,138 Views)
Although LabVIEW seems to know what version it was previously in, (it shows this information when you close a VI without saving and it promts you to save, you can click 'Explain' and it says it was in a previous version and what that version was) I don't think you can get that version number through a property node or any other means. This is probably due to the fact that as soon as you open a VI that was saved in a previous version, it recompiles it to the current version.


Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 4 of 8
(3,138 Views)
Andrey Dmitriev wrote:

> Dennis,
>
> Just short note. Revision Number of VI is available in Development
> Mode only. It is not available in Run-Time Engine (in builded
> application will be always returned zero).

That is not completely true. The Revision number and History are part of
the Front Panel resource and as such get removed when the Front Panel of
a VI is removed during building of the application. If the Front Panel
is maintained the revision history should stay present.

Rolf Kalbermatter
Rolf Kalbermatter
My Blog
0 Kudos
Message 5 of 8
(3,138 Views)
Hallo, Rolf,

Can you post here example of builded executable with illustration how it is possible to obtain Revision number? I agree, that Revision number is a part of front panel and saved in executable, when front panel is present (i checked this, its true). But this property node just not available in Run-Time (this also described in help). Its impossible to obtain revision number programmatically in builded application.

with best regards,
0 Kudos
Message 6 of 8
(3,138 Views)
How about using *.ini file which can store the reversion number at development environment, then you can read it at run-time environment.
of course you should add the ini file into support dir.
http://www.vitst.com
Virry Test & Control
LabVIEW Certified Developer
0 Kudos
Message 7 of 8
(2,874 Views)

Dennis' answer is probably the best, since at run-time the VI would have to at least been compiled before you can run it and whether you're running it in LV or in a built application, you know the version in advance.

You can get the version of LabVIEW in which a VI file was saved by calling the Application class method Get VI Version.


___________________
Try to take over the world!
0 Kudos
Message 8 of 8
(2,854 Views)