LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I extract VIs from a library and use them in a different project/library

I have an existing project that I want to change.

Reason is that I have a large number of custom VIs in the existing project that I want to reuse in a new project.

 

I've created a build rule in the existing project that exports all VIs to a folder, leaving me with one folder containing all the VIs.

But somehow there is still a reference in the separate VIs to the original library: whenever I try to add one of those VIs into a new library, I keep getting the complete tree of the old library (including the old library's name).

 

So how do I extract the VIs from the existing library and copy them into a new one (selectively).

It's about 50..80 sub VIs that I want to reuse so performing a one-by-one copy/paste of the VI's diagram is not an option.

 

Regards,

 

Rob

0 Kudos
Message 1 of 5
(3,968 Views)

Hi Rob,

 

Have you tried Library Manager (Tools -> LLB Manager)? I don't know if it helps, but I guess it's worth a try, 80 VIs is too much... 

0 Kudos
Message 2 of 5
(3,949 Views)

I think you can start by selectively copying the ones you want into a new folder, at this point, their relative references should still be maintained. then write a VI programmatically resave all those VIs into the same location but with option "Save as copy" set to true. then you should get a new set of VIs with new references updated.

 

I have recently worked on something similar, which is to make a copy of entire workspace of VIs (nested folders and 5k+ VIs) but their relative references should be updated in the new copy.

 

Not sure if this is what you need.

-------------------------------------------------------------
LabVIEW 2011 newbie >.<

Certified LabVIEW Developer
0 Kudos
Message 3 of 5
(3,946 Views)

Yes - I tried the LLB manager as suggested by Rodmar but then all VI references stay the same.

So if I then create a new tree, any of the VIs using sub-VIs still refer to the old folder instead of the new one. I'll have to try the "save as copy" to see if this work.

This is one of this little things I'm having problems with from time to time:

Having VIs or libraries with the same name in different directories may lead to using the wrong versions in a project. Although this sounds logical, this means that I have to delete my just built source distribution before continuing with development. Otherwise the development project may refer to items in user.lib that do not exist in another situation.

 

Thanks,

 

Rob

0 Kudos
Message 4 of 5
(3,920 Views)

Which version of LV you are using?. One suggestion is you can select "Save for previous version" and save it ina a new location where you want to save then all the dependent file will be followed automatically.

 

And also do not take a file which is kept in another project that will create a mess if it has lot of dependencies.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 5 of 5
(3,917 Views)