LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using vi in other applications

Hy everyone,
 
I have some vi's containing other sub vi's that I use in different LV applications.  So for example A.vi contains subvi's a1.vi, a2.vi etc. and are all located in Directory_A.  I start a new application B.vi in Directory_B which uses A.vi as a subvi.  No problem so far, but only A.vi is loaded from Directory_A unless I make a copy from it to Directory_B and use that one.  Still, a1.vi and a2.vi that will be adressed from within B.vi will be loaded from Directory_A.
 
When I work on one computer, this is not a real problem, but when I want to work on another computer, I need to copy all of them sub and sub-sub vi's from their correct location.  This can get rather difficult, as I need to remember the structure of each subvi I use and where all of it's components are located.  Also, if I want to make small changes to just this one subvi, It can get messy if you do not pay attention and possibly overwrite a vi that is also used in antother application.
 
I could put my vi's in the user lib or some other convenient directory and use them from there all the time and copy this directory to all other computers.  This would be an easy solution to most of the problems, but still I am wondering if I can make some kind of a package containing A.vi and all of its subcomponents (a1, a2, ...) and just copy this package in every new project I write.  This way, it would be a copy of the original that is only used in this new project.  And when I make changes to any of it's sub-sub-sub vi's, they would only apply to this one project.
 
I played around with llb's but that's not a solution (for as far as I could figure out).  Mayby DLL's ?
 
Anyone any ideas ?  Hope the explanation is somewhat clear 🙂
 
Jan
 
 
0 Kudos
Message 1 of 3
(2,505 Views)
You can do File >> Save As >> Duplicate Heirarchy to new location

(I am using 8.2)
0 Kudos
Message 2 of 3
(2,497 Views)
A VI will remember the path to the subVIs it uses. Thus, you can have copies of VIs or whole directories in separate projects and the VIs within those projects can link to the "Directory_A" that's within that project. You don't need LLBs, but you can use them if you wish. Changing a VI that's in the Directory_A of one project will not affect the same VI that's in the Directory_A of another project. I do this all the time in order to keep project wholly self-contained.

The real issue is whether or not you've customized your search path. If you're using the default search path for VIs this should not be a problem. The one time this will be an issue is if, for example, you first load the a1.vi subVI in the Directory_A that's in project1, and then open a A.vi in project2. Since A.vi uses a1.vi, it will use the a1.vi that's in memory, which is the one from project2. It will then think it needs to be saved since the path to the subVI changed.
0 Kudos
Message 3 of 3
(2,493 Views)