03-30-2020 08:14 AM
I'm using VI Scripting to add/remove elements from a typedef cluster inside a LabVIEW library. The project already contain a build specification to create a packed project library from the library containing the typedef. I would like to know if it's possible to run this build specification programmatically using VI Scripting (or with another method)?
Thanks,
Ben
Solved! Go to Solution.
03-30-2020 10:28 AM - edited 03-30-2020 10:45 AM
You should be able to use the Application Builder API to programatically run a build specification (or indeed, create an entirely new one and set all the necessary values).
For PPLs, you should take a look at vi.lib\AppBuilder\AB_API\PPL for the API and probably "Open BuildPacked Library.vi" in that directory for the loading of a Build object from the name of the build specification and a project and target reference.
Then you can call Build.vi on that object to build the specification.
Here's a quick example using the following VIs:
vi.lib\AppBuilder\AB_API\Build\Open Build.vi
vi.lib\AppBuilder\AB_API\Build\Build.vi
Here I used the Build class Open Build, so I specified the Packed Library input, there's also an "Open Packed Library.vi" in the PPL folder which doesn't require a target reference or the enum.
03-30-2020 10:59 AM
03-30-2020
11:04 AM
- last edited on
12-18-2024
11:20 AM
by
Content Cleaner
It's as far as I know just the API for the Application Builder system.
It ships in VI.lib for LabVIEW 2017 and 2019 at the very least, although I imagine it requires the Application Builder module. That is included in the professional edition but not the Base or Full.
However, without that you can't build PPLs at all, as far as I know (?), so I'd assumed you had access to it.
03-30-2020
11:08 AM
- last edited on
12-18-2024
11:21 AM
by
Content Cleaner
Hmm. Actually, this isn't even the easiest way.
If you already have the build specification set up, and don't need to edit it (because the API I showed above also has lots of VIs to change every attribute or property of the specification, or script it entirely from scratcch) then you can use the VI at Application Control > Application Builder > Build.vi
03-30-2020 11:10 AM
03-30-2020 11:15 AM
@ben64 wrote:
This is what my application builder palette looks like (LV2019 Pro):
Ben64
Yeah, same. I gave the paths in the first posts because I don't think the "good stuff" is on the palettes.
Maybe there's a hidden gem equivalent package or something, but I haven't tried looking for one.
Once you have a couple in your building VI, you can use the Dependencies list to find more, or you can just keep Explorer open and guess based on file names and directories.
The documentation is a little sparse, but the VIs are powerful. Most block diagrams are locked. Fortunately you probably only have to do it once(ish)...
03-30-2020 11:20 AM
03-30-2020 04:57 PM
We use a combination of a modified version of the MGI Solution Explorer and Jenkins to build our PPLs. Granted, we have over 170 PPLs which are roughly split equally between reuse libraries and plugins. To manage this many we need a good build process. MGI Solution Explorer makes it easy build the various levels of the PPLs in the proper order as well as only building what is necessary. Jenkins automates the process for us.
03-31-2020 06:59 AM