LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

decimate library

Solved!
Go to solution

I would like to decimate a library that I created.  The only way I know to do it is to click on each file and then click "remove from Library".  Does anyone know a way that I can just decimate the entire library?

0 Kudos
Message 1 of 5
(2,752 Views)

If the Library is in a Project, you should be able to right-click the Library in the Project Explorer and choose Remove from Project (at least that's how I remember doing this ...).

 

Bob Schor

0 Kudos
Message 2 of 5
(2,748 Views)

That removes it from the project, but the VIs are still part of the library.

0 Kudos
Message 3 of 5
(2,738 Views)
Solution
Accepted by topic author OregonGumby

There is an invoke node for a VI reference called Disconnect From Library.  Get a list of all VIs you want to disconnect with the recursive file list, then Open a reference to each VI in a for loop, disconnect it with that invoke node, then save it with another invoke node.

0 Kudos
Message 4 of 5
(2,720 Views)

I should have asked -- what kind of Library?  There is a Packed Library (.lvlibp) and what I'll call an "ordinary" library, .lvlib.  I'm talking about the latter, the .lvlib.  As I understand it (and this is consistent with what I saw when I did this, myself), the .lvlib is little more than an XML file referencing the VIs that comprise the Library.  [Just a second -- I'm going to test this before I start making claims that aren't true ...]

 

If you simply remove the Library from the Project, this "breaks" the association of the Library itself (and its contained VIs) with the Project.  However, it does not break the relationship of the VIs inside the Library with the Library, itself.  For example, if MyLib contained MyVI, then if I opened MyVI, I would see it identified as MyLib:MyVI.  So you need to break the association of the VI with its (including) Library.

 

One way to do this is to create a Virtual Folder in your Project (in my case, I called it Ex Libris, which does literally does mean "from the Library", to my surprise) and drag the Library contents to it.  This "removes" the contents from the Library.  Now when you delete the Library from the Project, you still have the Library contents, out of the Library, in the Ex Libris Virtual Folder.  At this point, it should be safe to delete the actual .lvlib file from your disk.

 

Bob Schor

 

0 Kudos
Message 5 of 5
(2,709 Views)