LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Set version string from a shared file in App Builder

I am upgrading my applications to use the new LabVIEW 8.0.1 Pro env. I am getting used to the new App Builder features and I like what i see. However... i am having a couple of issues...

1. I now have to change build number in both my About_Dialog.vi AND in the build properties.
2. I now have to change the build number for EACH binary i build, EACH time i build.

Is there a way to, at build time, read a file to set the version string? IE. Can i have a text file that is called fileversion.txt or something and have it be read to populate the build version?

Is there a way to have a pre/post build script that can be run to set parameters/configs using the 8.0 App Builder?

The primary reason for this is that since i cannot use a command line option to build my executables, i would at least like to simplify it to be able to use a simple mouse clicker app. However the version info has to change with each build and that increases the complexity of the script 10 fold. Alternatively, is it possible to remove the version info from the binary? I like the feature a lot, but my customers are going to get confused if the about dialog says something different than the binary properties.
0 Kudos
Message 1 of 5
(3,077 Views)
Hello,
 
There is no available way for you to modify the build version of any application. But if needed, you could modify the revision for a specific VI.To do this you would need to use property and invoke nodes. Kindly look at the attached image for reference. The code in the first half of the attached image you let you modify the revision for a specific VI. The second half of the image shows how to read the version number of a specific application. Note, its not possible to write to this property as its read-only.
 
Regards,
Chetan K
Application Engineering
NI
 
 
0 Kudos
Message 2 of 5
(3,058 Views)
I tried using the "App Version" property before and all i ever got was 8.0.1 which is the LabVIEW version used. I assumed that this might be different when running as an exe, but it was not. Also, it is not the "revision history" that i want to pull. I need to have a standard "About" dialog that displays the x.x.x.x version number of the application as a whole, not the individual source vi's. I also need to programatically change the build number for incremental builds without any human intervention.

As a hack solution, I am setting up a perl script to change the following in my .lvproj files:

<Property Name="VersionInfoFileVersionBuild" Type="Int">14</Property>

I have also found a link to pull the version of the binary using windows APIs at:

http://digital.ni.com/public.nsf/allkb/935ba7fb426305398625711e0055f1fa

With these two pieces I am planning to use a mouse mover application to do automated builds with incremented build numbers. If all works correctly, i should be able to keep the windows binary info and the "About" Dialog in sync.

I am still holding out hope for a better way to do this, but this is the best i can come up with at the moment.

Can you tell me if there is anything i could do with "Conditional Disable Symbols" that might help me with this at runtime? Can you provide more information on what these could be used for?

0 Kudos
Message 3 of 5
(3,051 Views)
One other question... is there a way to set a property/named value in the "Project" that is accessible at runtime other than the Conditional Disable? If i could set a couple of values in either the .lvproj or another file that could be read at runtime, it might also help me accomplish the same thing as my current hack.
0 Kudos
Message 4 of 5
(3,050 Views)

Hello Plexsys,

With LabVIEW 8.0, in the project explorer you can have VIs targeted to multiple devices. This is where to conditional disable structure comes into the picture. With this structure it possible at runtime to disable a section of the code depending upon the target on which this VI is running.

Besides working with multiple targets (using the Target Type symbol), you can also define your own symbol. This way a VI can behave differently when used in conjunction with different projects. You can define the symbol for a project by right clicking on the Project (in project explorer) and selecting “properties”. This way, if a specific VI is moved over from one project to the other (with a different symbol value), then it would behave differently. If a project does not contain one of the symbol values, then the default case would be executed.

You can always refer to LabVIEW help for more information on the conditional disable structure.

At this moment I don’t think that the conditional disable structure could provide you with the functionality that you are looking for.

Regards,

Chetan K

Application Engineer

National Instruments

 

0 Kudos
Message 5 of 5
(3,032 Views)