02-04-2016 09:42 AM
What I want to do is add a set of files to a project library that already exists.
Here is the scenario:
1. Create a directory structure. Auto-populate is turned on. Add or create VIs, ctls, ...
2. Turn off Auto-Populate.
3. Convert to library.
4. Later on (days or months even).
5. Create new VIs and save them into folders that are part of the library.
6. Somehow tell the library to auotmatically add all these new files to the lilbrary.
Do you know an easy way to do this?
(A corrilary question would be how to automatially disconnect all files and folders from a library. In that way I could just re-create the library anew from the directory structure. I would have to set access modes though.)
02-04-2016 09:52 AM
@Mark_L wrote:
[...]
5. Create new VIs and save them into folders that are part of the library.[...]
You do this outside of the lvproj you use to manage your lvlib?
If so, you should re-enable auto-population:
Once all items in the lvlib are update, you can turn it off again.
Norbert
02-04-2016 10:30 AM
I am working within the Project or within the Library, both within LabVIEW.
The newly create VIs would be saved to a folder where the other library files are also located.
The "Convert to Auto-populating Folder..." right click option is not available inside the library.
02-04-2016 02:07 PM
Usually I delete the virtual folder that was created and just drag the folder from Windows Explorer back to where it should go.
02-05-2016 02:22 AM
@Mark_L wrote:
[...]
The "Convert to Auto-populating Folder..." right click option is not available inside the library.
[...]
That is correct and mandatory.
Is it correct if i state: You create the VIs OUTSIDE the library (lvlib) and then want to ADD those VIs easily to the library (lvlib).
If i am correct, the issue you are facing is that both the lvlib file (XML file) AND the VI file (binary) know of each other: name and location.
This is necessary as the lvlib file defines things like access scope for each library item. Hence the VI requires the knowledge where the lvlib is located.
You cannot add a VI to a lvlib outside of LV as that process requires to modify both the XML based lvlib file as well as the binary VI file. Therefore you have to use the Add function of the lvlib context menu in your project window and select all (multiple) files.
Norbert
02-05-2016 10:07 AM
OK. I understand now how to make a new VI easily part of the library. Thanks.
If I right click on the library in the project and select New >> VI then the VI will be in the library. Even though it is say in the Private VIs folder on disk I have to move it there in the library from within LabVIEW.
If I have the library highlighted and select from the menu File >> New VI the VI will be in the project and I will have to add it to the library by moving the VI from within LabVIEW.
This is what I was doing and seemed overly complicated. I would get several VIs that were not listed in the library this way.
By using the right click method the VI is at least in the library although I have to move it to the correct virtual folder.
Thanks again this helps.
02-05-2016 12:33 PM
You can also just drag the icon from either the block diagram or front panel where you want it to go in the library.