LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Maintaining *.lvlib inside another *.lvlibs

Good day!

I am new to LabVIEW, I use version 2018. I want to have library that contain some sublibraries. On disk it looks like this:

Custom Libraries folder

    - Library 1 folder

          - Public folder

          - Private folder

          - Library 1.lvlib

    - Library 2 folder

          - Public folder

          - Private folder

          - Library 2.lvlib

When I add Library 2 to Library 1 via project manager and save Library 1 it shows me that Library 2 change its membership, and if I try to open Library 2 separately it opens Library 1 that contains Library 2. Why this happens? In text programming languages if I have Library 1 that contain another Library 2 I can use Library 2 separately and don't load Library 1 to project to use Library 2. I figure out if I copy Library 2 folder to Library 1 folder and add it to Library 1 via manager then I will be able to use Library 2 separately if I use it from its own folder. With this situation I have question: how can I maintain Library 2 if it will be used in many others Libraries? I will have to copy Library 2 manually to all Libraries that use it?

 

 

0 Kudos
Message 1 of 3
(1,682 Views)

@LegT wrote:

With this situation I have question: how can I maintain Library 2 if it will be used in many others Libraries? I will have to copy Library 2 manually to all Libraries that use it?


Sounds like Library 2 does not actually belong inside of Library 1.  But that does not mean you cannot call VIs from Library 2 inside of VIs in Library 1.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 3
(1,652 Views)

After a little bit of time, I think I should have put a little more explanation in.
I'm lazy, so for now on I will use X for Library 1 and Y for Library 2.
When you add Y to X, you have now made Y part of X. So if you load up Y, it needs to load up the context (X) it is part of. Based on the rest of your description, you have actually created a reverse dependency. We don't want that. But any VI, whether or not it is in a library, can call any public VI in Y. So you just have X.lvlib::a.vi call Y.lvlib::b.vi and your dependencies are in the correct direction (X will depend on Y, Y will not depend on X). Y can live in isolation and be used by anybody.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 3
(1,645 Views)