LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get static data from file system at build time

Hi,

 

I want to have a label in a labVIEW to get it's contents from the file system during runtime. I will use this to have my automated build environment to set the software version string to be displayed in the LabVIEW application within a "about" dialogue.

 

Does anyone know about any trick for doing a thing like this in LabVIEW? If this whould have been a C or C++ application I would have put the version string as a #define in a .h-file or in an object file to be linked with the application.

 

Thanks,

//Christian Eggertsen

0 Kudos
Message 1 of 4
(2,353 Views)

Hi Christian,

there are different solutions. For one please see this link. The other one would be to use the PreBuild function to write the version with the use of scripting into a constant, which you can access from within your applicaton.

 

Hope it helps.

Mike

0 Kudos
Message 2 of 4
(2,351 Views)

@MikeS81 wrote:

Hi Christian,

.... The other one would be to use the PreBuild function to write the version with the use of scripting into a constant, which you can access from within your applicaton.

 

Hope it helps.

Mike


You don't even need a constant, you can have a VI that has a Front-Panel control, load the desired version number into the control. Use the Method 'Make current value default' and save the VI and build. Within your code you can call the VI and read the stored data.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 3 of 4
(2,348 Views)

Hi,

 

Thanks for a relly fast reply. Would this be possible to to automatically, e.g. from the Build Targets Via Command Line.vi (included with the labVIEW examples VIs)?

0 Kudos
Message 4 of 4
(2,344 Views)