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.
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.
12-15-2016 04:44 AM
Hello,
I want to add build time into program. Is there any posibility to make this?
Or is it possible to change a variable (string) in a non-running VI from a VI. If so then I can generate a VI and put it in the setting in build properties, Pre/Post Build Actions. I can run this VI before build and change the text in that VI which will be built.
Thanks.
12-15-2016 04:48 AM - edited 12-15-2016 04:50 AM
Hi kahlenberg,
I usually put such informations in the "description", found at the "version info" page of the AppBuilder settings.
You can manipulate this information also using a PreBuild action VI!
Otherwise use VIScripting in a PreBuild VI to manipulate a string or timestamp constant in your VI containing the build time information…
12-15-2016 08:44 PM
@GerdW wrote:
Hi kahlenberg,
I usually put such informations in the "description", found at the "version info" page of the AppBuilder settings.
You can manipulate this information also using a PreBuild action VI!
How do you update the Description found on the Version Info page with a PreBuild Action? I've posted (somewhere on the Forum) a VI I wrote to manipulate (using the Set Build Specification Version function) the Version numbers using a Pre-Build Action, then displaying them when the program runs using Get Build Specification Version. I'm not aware of a similar pair of routines for the Description (I confess I haven't looked carefully at Properties or Invoke Nodes).
However, I've also documented (and asked for a "fix" on the Idea Exchange) that at least the Version information is cached before the "Pre-Build Action", so updating it with Set Build Specification Version has no effect on the current Build. You need to Build Twice (Build Twice) for this to take effect. Don't know if the same "feature" holds for the Version Description.
Bob Schor
12-16-2016 02:39 AM
Hi,
I have to admit I change the version description manually as I put some more information into…
But in general you can edit all this information by fiddling with the lvproj XML file. And you can use the AppBuilder API to programmatically build your executable.
So maybe you can't use a PreBuild Action VI "immediately" (have to run it twice as Bob says) - but then you can create the executable by calling a VI not included in your project.
12-16-2016 08:15 AM - edited 12-16-2016 08:17 AM
I didn't see it linked to yet so here is the example I made where you can change the version with the PreBuild, which will then abort the build, then invoking it a second time takes the changes you made.
http://forums.ni.com/t5/LabVIEW/Pre-Build-EXE-and-Installer-Set-Version/td-p/3149028
Similarly you could do this with the description on the build. Or I've see just a string constant in your VI that is shown as an indicator on the UI, and the pre build just sets the string value before the build. This can be done with scripting pretty easily using static VI references, and finding GObjects by their label (Hidden Gems).
Oh but also can't you just look at the EXE file creation date? If you install the application from an installer I assume that date doesn't change from the original build date of the EXE.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord