LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Best practice for using common VIs

Hi,

I have some projects, which use some common VIs (like open/close file format and similar). What is the best practice to use these common VIs? Now I copy these to the project folders, but now I have multiple copies of some VIs, which is difficult to maintian, if I need to modify something in these common files. 

What sould i use? Still copy, or link the common folder to my project, or use a packed project, or something else?

Thanks

__________________
Engage! using LV2015
0 Kudos
Message 1 of 6
(3,349 Views)

What i'd do is have a Project folder with your specific project folders, and a Utility folder (or similar name) with the common VIs. That way it's easy to build up a reusable code library. In this Utility folder you can organize through subfolders, lvlib, llb's, classes and/or what else fits your style. 🙂

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 2 of 6
(3,323 Views)

dont know if it is the best practice but with every new project, I create a new folder in my project (right click on my computer -> new -> virtual folder) and link that virtual folder to my folder that contains all my common code (vi/ctl/class) by right clicking on the newly created virtual folder and choosing "Convert to auto-populating folder".

 

One downside is that if you modify one of those vis for your new application, it might break it for one of your older projects.

I also use source code control (svn / git / mercurial / etc..) so if that happens, I can always go back to a previous working version.

Message 3 of 6
(3,321 Views)

What you realy want to do here is use VI Package Manager (VIPM).  You create packages of your reuse code and you install the packages you want/need.  The real beauty of doing it this way is they can also be added to your palettes.  And if you go with the pro version of VIPM, you can create package configurations to add to your project to make sure you know exactly which version of what packages were used for that project.


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 4 of 6
(3,252 Views)

thank you all for your suggestions

__________________
Engage! using LV2015
0 Kudos
Message 5 of 6
(3,198 Views)

VI's that I have made and reuse constantly are stored in C:\Program Files (x86)\National Instruments\LabVIEW 2014\user.lib (or a sub dir under it), that way all projects have access to them without having multiple copies is each project.

========================
=== Engineer Ambiguously ===
========================
Message 6 of 6
(3,168 Views)