LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

programmatically create build specification

Here's my problem. I have several dozen projects, each of which contain the same VIs (more or less) but are for different hardware configurations. In particular, they all contain 1) a PXI target that contains a unique EtherCAT configuration, 2) a unique startup VI that should run on the PXI, and 3) other peripherals that may have build specifications as well (e.g. FPGAs). Occasionally I need to make a change to the way our code builds, and that means I need to open every single project to make the change. Since the projects are very large, this takes a long time.

 

My solution is to create a separate program whose job will be to open the selected project, create build specifications with the settings that are common across all the projects, allow the user to select unique aspects such as the startup VI for the PXI, and build any/all other build specifications necessary for the selected project.

 

I found here a topic disucssing modifying build specifications programmatically, but since I want to create a build specification, I would need to know what every single tag is, how it is used, what its allowed values are, etc. Is there some documentation I can refer to for this? Or better yet an example VI that someone has already put together?

0 Kudos
Message 1 of 6
(3,289 Views)
Documentation? No
Better examples? No

Unfortunately, this is one of those areas where you are sort of out there performing without a net.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 6
(3,261 Views)

Dunno if this refers to FPGA at all, but these examples of the API might help:

https://decibel.ni.com/content/docs/DOC-35967

 

If not, you can at least do some automated building with these VIs:

https://decibel.ni.com/content/docs/DOC-36878

0 Kudos
Message 3 of 6
(3,248 Views)

You could try using the Application Builder API that ships with LabVIEW like dems mentioned. That's probably going to be your best bet, although it will not help with FPGA build specs. Unless something has changed recently, FPGA uses an entirely different method for building specs that are not included in the App Builder API. However, there are a couple forum threads out there, which may provided some information on how the FPGA builds work. 

 

You'll probably mainly just find VIs that do building and not creating of build specs, but those answers may point you to some VIs that will allow you to create the specs. Please note that neither the App Builder API nor any other build VIs you find in vi.lib that are not on the LabVIEW palettes are not officially supported by NI, so you'll likely be on your own.

Donovan
0 Kudos
Message 4 of 6
(3,228 Views)
The other thing to remember is that at the end of the day, the output of the build specification process is just a string that happens to be part of an XML file (the *.lvproj).

You can always check your work by opening the project file with a text editor and verifying that it is correct. Just remember that because this is not documented or supported, it can change at any time. So if you are successful, anytime you update LV you will need to recheck this code to make sure it still works.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 5 of 6
(3,218 Views)

The application builder API was so close to what I needed, but unfortunately it can't be used to build real-time applications in LabView 2013. It looks like my best bet is going to be to edit the XML for the build specs in the project file directly. Oh well.

0 Kudos
Message 6 of 6
(3,196 Views)