LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Best way to save a vi that is used in multiple projects?

  Hello,
 
I have an archive of vi's that I use in multiple projects.  As an example, I store all my vi's in a folder called 'Archive'.  When I start a new project, I make a new directory, say 'Proj A', and then I drag copies of the original vi's from 'Archive'  into 'Proj A'.  When I launch Proj A, labview always loads the files from their original location ('Archive') instead of 'Proj A'.
 
Is there a better or more proper way?  I heard LV8.0 may take care of this issue.
 
Thanks,
 
Tony.
 
P.S.  I apologize for posting two blank threads a few minutes back.  Can't figure out how to delete them.

Message Edited by TonyO on 10-13-2005 02:02 PM

0 Kudos
Message 1 of 4
(2,732 Views)
You could store them in user.lib in the LabVIEW folder.
 
They will show up in the pallette under "user libraries" so you can use them in all your projects. No copying needed. 🙂
0 Kudos
Message 2 of 4
(2,722 Views)

I agree with altenbach for utility type VIs and common drivers.  I use source code control for them, but have them set for a shadow folder in my user.lib, puts them at my finger tips.  If other VIs are required to cross projects, I create symbolic links within the source code control to insure that updates to one are replicated through to other projects, but crosslinking is an issue.  I have to insure that all subVIs to the one that needs to replicated are also symbolically linked and relative paths stay the same.  Currently a very manual process.

If only I had time to work on my project builder idea....


Paul
0 Kudos
Message 3 of 4
(2,714 Views)

User.lib as mentioned by the others is the way to go if you have no issues reagarding sharing the contents of user.lib across multiple machines. The complications I have seen with this is that if I move an application to my customer's machine and some of the VI's were stored in user.lib the application will not find them unless I thought ahead and pulled out the parts the app needs. I also do not want to give away my entire re-use library everytime I include one of the containded functions.

If you just want to pull out elements from your collection then templates can be of some use.

If you need to selectively pull out parts of your archieve for use when required, then a "Tree.VI" can help. A Tree.VI is a VI that contains all of the top level and dynamixally loaded VI's used by the function to operate correctly. By opening the Tree.VI and doing a "Save with options"... single prompt preserve hiarchy... the requred VI's are copied to the new location and saved with the relative paths adjusted to point at the new location. This takes care of the cross linking issues.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 4
(2,706 Views)