LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I set a build specificaiton's target filename and destination directory programmatically?

Solved!
Go to solution

I'm trying to simplify my application build process. Currently, whenever I make a new build, I take the current build and change the build spec name, target filename and destination directory manually.

 

I'd like to have a pre-build VI run that changes the build target filename and destination directory based on the auto-incrementing version number. I've found GetTargetBuildSpecs.vi in ...\vi.lib\AppBuilder\, but can't find any property nodes that let me set the build spec properties that I want to.

 

Anyone have info on this?

 

Thanks,

0 Kudos
Message 1 of 26
(4,761 Views)

there is probably a better way but the proj file is just XML or something similar so you could hack the proj file and change the name.

 

I did find a pile of proj and build VIs (VI/lib project) but no documentation or a clue how to use them .

 

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 26
(4,756 Views)

Yeah, editing the XML was mentioned in http://forums.ni.com/t5/LabVIEW/Build-executable-and-installer-programmatically/m-p/911384/highlight.... I'll look into that, but it may be more trouble than it's worth for my case.

 

The worst part of all this is that I'm almost certain that I've seen this before, i just can't remember where I saw it or what my search query was Smiley Sad

0 Kudos
Message 3 of 26
(4,752 Views)

Could it have been OpenG?  I've never tried doing builds other than "manually", but seem to recall seeing "Application Builder" VIs in the OpenG library.

0 Kudos
Message 4 of 26
(4,740 Views)

The only thing I found in OpenG is "Dist Build App rom LLB (proxy)" which doesn't seem to help. It could be that I don't have all the OpenG packages installed, but I do have everything that's listed on VIPM.

 

I've been screwing around with all the files in vi.lib/AppBuilder. I'll be sure to post if I find something that works. But if anyone has done this before, it would make my job a lot easier... Smiley Very Happy

0 Kudos
Message 5 of 26
(4,718 Views)

I'm not at all sure that a VI server API exists for these settings. If you look at the app builder itself (in <resource>\framework) and at the vi.lib VIs, you will see that they all use LV classes and that the properties you want don't appear when you select the build. It's quite possible that all the code to manipulate these settings is done directly by the AB VIs.

 

 


___________________
Try to take over the world!
0 Kudos
Message 6 of 26
(4,715 Views)

That's what I've been finding. I see a whole bunch of class methods, most of which are private in scope. Ah well. I've created an Idea that adds the ability to easily change these things. Hopefully it gets enough publicity to be added into LV2013.

0 Kudos
Message 7 of 26
(4,712 Views)

...so hacking thproj file and using the app build functions exposd on the palette should work.

 

Not elegant.

 

I'll ping support to see what we have been missing.

 

Ben

 

For a real thrill, add that folder to a project, find one of the classes and show Class hiarchy. THen do a ctrl-a to show all. The class hiarchy alone looks like the VI hiarchy of a medium sized app.

 

From that experiment I suspect the parent class of the app builder has the methods we need...but are they exposed?

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 8 of 26
(4,711 Views)

Have you check the code available in the NI example finder? I believe you can find there some examples that can get you started. Please go to Programmatically Controlling VIs»Manipulating Application and VI Settings. I'm attaching the interesting ones. I hope this helps! Smiley Wink

Alejandro C. | National Instruments
0 Kudos
Message 9 of 26
(4,695 Views)

"Change Build Spec name"?

 

 

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 10 of 26
(4,688 Views)