LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically build library

Hi,

 

I have a collection of VIs that I would like to distribute as a library.

 

At the moment, I have an automatic check of the collection (mass compile, check state and run some tests with VI Analyzer). It returns me a list of VIs that are working and can be distributed. However, I've no idea on how to gather those VIs in a single library. I would like to have a single file containing all VIs but keeping the hierarchy of my VIs (they are placed in different folders depending on their category). It would also be nice if the VIs cannot be modified once their are built in the library.

 

I've tried to use the llb type but there is not hierarchy.

 

Is there any solution for this ?

 

Thanks,

Alex

0 Kudos
Message 1 of 6
(3,014 Views)

Hi Alex,

 

you could use a lvlib. It keeps the hierarchy.

To protect the block diagram you can set a password on each VI - or strip the block diagram completely. Each option has it's shortcoming (no perfect protection for the first, no possibility to change LabVIEW version afterwards on the second), so make your own decision on that...

 

Edited:

A lvlib doesn't create a single file. You may use a packed lvlib instead...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(3,008 Views)

Hi GerdW,

 

Thanks for your quick reply.

 

Your solution looks good but is there any way to generate this programmatically ?

 

Thanks,

Alex

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

Hi Alex,

 

you can create build settings in the project explorer. You can call the AppBuilder by functions from the "App Control" functions palette.

 

Conclusion: Yes, there is a way to do that automatically...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(3,000 Views)

Hi GerdW,

 

I've found some VIs in the "Application Control" but they only allow the build of an existing build specification. I would to create an lvlib from scratch and the corresponding packed library programmatically.

 

If I want to include all the dependencies in my library, do I need to create a source distribution and then create a library from this source distribution (I want to include VIs from vi.lib, user.lib and instr.lib) ?

 

Thanks,

Alex

0 Kudos
Message 5 of 6
(2,987 Views)

Even if this post is quiet old, I found some information about how to create a build programmatically. Actually NI Provides examples that are located in the installation folder : ... National Instruments\LabVIEW 20XX\vi.lib\AppBuilder\AB_API\examples

0 Kudos
Message 6 of 6
(2,745 Views)