LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Increasing programming speed: How to reuse code?

I am sure all of you have different methods of reusing code, but I haven't found a method I really like, so I hope I can get some new ideas from this thread. 

 

My primary criteria is that my projects does not use any dependencies outside it's designated folder.   

 

My favourite, at the moment, is the "place VI contents" selectable from the palette editor, but Icon and documentation is lost in this process, so for templates this is a very impractical approach. 

 

I would like a way to open a .vi so it is considered unsaved. Is this even possible? Or is there any other clever tricks for easy code/template reuse? Please share!

 

0 Kudos
Message 1 of 5
(2,831 Views)

for code reuse you could create subVI's

 

 

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 2 of 5
(2,829 Views)

"I would like a way to open a .vi so it is considered unsaved. Is this even possible? Or is there any other clever tricks for easy code/template reuse? Please share!"

 

 

I don't know how new you are to labview, but you could use LabVIEW scripting which is not for beginners.

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 3 of 5
(2,827 Views)

You don't really need scripting for it. You could write a tool that browses all VIs of your project and checks if they are in the allowed scope (folder structure). If not, it would copy these files to a certain folder.

Close all, open all copied files, reopen the top level vi and save all to make the linkage.

 

Felix 

0 Kudos
Message 4 of 5
(2,823 Views)
If you save your code as a *.VIT (VI template) instead of *.VI, you will open an unsaved VI when you open it through File>>new>>VI>>From template>>browse.
0 Kudos
Message 5 of 5
(2,755 Views)