01-19-2016 05:21 PM - edited 01-19-2016 05:32 PM
When I use the "get build specification VI" in a VI it works as intended providing the Major, minor, fix and build number of what ever project it is pointing at, However, when I buuild that VI into an exicutible, and run that exicutable it always returns 0 for all for fields.
Does anyone know why it would do that?
Running on windows 7 Enterprize
Labview 15 Professional Development System
Solved! Go to Solution.
01-19-2016 07:04 PM
The included LabVIEW Help has some excellent advice on how to build an executable - and what to watch out for. Especially about things like what you are experienceing.
01-19-2016 10:02 PM
I think the reason it doesn't work in an Executable is because ... it is not supposed to work in an Executable. It is designed to retrieve the Build Spec from the Project (.lvproj) file, which generally is not available at Run Time.
However, there is another function, FileVersionInfo (found in the Hidden Gems that you can find in the LabVIEW Tools Network using VIPM). When you build an Executable, the Version information is placed wherever Microsoft wants this to be saved, and the LabVIEW function will retrieve it for you, along with the Executable's Program Name. Here is a Snippet from my Program and Version utility:
Works like a charm. However, don't get me started in trying to use Set Build Specification as part of the Pre-Build Action (I'm currently having a "discussion" with NI, which I am clearly losing, about what "Pre-Build" means ...).
Bob Schor
01-20-2016 02:59 PM
Thanks for the post, worked like a charm!
01-20-2016 03:04 PM - edited 01-20-2016 03:06 PM
RE: bilko
Thanks for the post. I checked it out a little today. I don't think I'm fluent enough in "meathods" and "properties" to understand their disclaimer about how some VI's won't work properly in a run time envernment.