From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

packed library distribution and the user.lib folder

I have multiple common/stable  VI's that other developers use.  Like many others, when I reuse code I usually copy and paste it in the new project.  I'm trying to get away from that.

 

I like the public/private feature that the library provides, and from the reading sounds like the packed library is precompiled making it faster.  Also, the packed library can still show the code/debugging but is not editable.

 

My intention is to create a library that I can install in the user.lib.  This way people can use the functions, see how they work, but not modify them.  Is the packed project library the right way?  How do you go about creating the library?

 

Thanks,

 

Bryan

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

Bryan,

 

packed libraries are definetly a way to go. The basis of a packed (project) library is a lvlib, and you should define items as public/private.

 

By default, all public items are configured as "Exported" for the lvlibp (packed library).

 

The only thing which differs for your request is the following:

The build process for the packed library does by default remove the block diagram of the exported items. You can change this, but all private (not exported) items will show up in the blockdiagram of the exported items with a "?" as icon:

PrivateItem.png

 

The user cannot make any changes to the VI even if the blockdiagram is included.

 

hope this helps,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 2 of 6
(3,762 Views)

That's interesting.  I can make the VI's all public since they are not editable, and just to keep things clean I can place the files I wanted to hide in another virtual folder identifying them as subVIs.

 

I do have a question on installing them.  I've tried just dropping the packed library (.lvlibp) directly into the user.lib folder with no success.  How do you go about installing the packed library so it appears in your functions palette?

 

Bryan

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

Bryan,

 

i did not do this the complete way, so i am not sure if it will result in the features you are looking for. But here is what i find promising:

1. You have to create an .mnu file for you lvlib using the tool Tools>>Advanced>>Edit Palette Set. Insert all VIs you want to have on your palette in the correct palette and save the mnu file.

2. Build the lvlibp and include the mnu file for the exported functions.

3. Place the lvlibp in the user.lib folder in a subfolder you find suitable on the target PC.

4. Open Edit Palette Set on this target PC and browse to the User Libraries subfolder. Rightclick the empty palette and select Insert >> Subpalette. This should open the following dialog:

InsertSubpalette.png

 

5. Select the last bullet in the list, browse to your lvlibp and press ok. It should populate the subpalette in the manner your mnu file defines.

 

hopes this helps,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 4 of 6
(3,743 Views)

Thanks for the post Norbert!

 

To add to his post, this KnowledgeBase is helpful to show what Norbert is talking about using pictures. It is a KnowledgeBase from LabVIEW 8.2, but the steps that you have to go through are still the same. Hope this helps!

 

Creating A Custom LabVIEW Palette

 

Kim W.

Applications Engineer
National Instruments
0 Kudos
Message 5 of 6
(3,729 Views)

Hi,

 

I have problems adding packed project library to a pallete. If I select "Link a palette file in a project library", I get an error "The library you selected does not contain any valid menu files". What should I do?

 

Thank,

Andrej

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