LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Locking VIs

Hi,
 
I have couple hundred VIs and I would like to lock them before distributing them.  VIs are organized in a directory structure.  Is there a way to lock them, just as you mass-compile 'em?
 
Comments/suggestions are appreciated. Thank you.  
0 Kudos
Message 1 of 3
(2,529 Views)

Do you mean lock the user from accessing the block diagram of your vi??

If that is the scenerio and If they are all a part of a single Main VI, why not give it as a executable?

You could also remove the block diagram of each individual vi. But i am not sure if this can be done on same lines of 'mass compiling'

Message Edited by devchander on 11-08-2006 12:13 AM

0 Kudos
Message 2 of 3
(2,524 Views)
Hi,


You can get an array of VI names with the application property "All VI's in Memory". Once you have it, create a for loop, open a VI reference with each string (name of the vi's), and use the VI method "Lock VI". Optionally, you can save the vi's with a method (also without diagram).


Needless to say: Make backups before you do this! Saving all vi's in memory without diagram makes it impossible to ever modify them again!


You can also save the vi's (with the method) to another location. It's easier to simply copy the entire directory, and then do the previous trick.


In stead of using "All VI's in Memory" you can use a recursive directory search (there is one in the LabVIEW directory, used by LabVIEW).


Also remember, that the password will be added to the pw cache, so the vi's appear not to be locked untill you clear the password cache (or restart LabVIEW).


Regards,


Wiebe.



"Troy12" <x@no.email> wrote in message news:1162957207820-438029@exchange.ni.com...
Hi,
&nbsp;
I have couple hundred&nbsp;VIs and I would like to lock them before distributing them.&nbsp; VIs are organized in a directory structure.&nbsp; Is there a way to lock them, just as you mass-compile 'em?
&nbsp;
Comments/suggestions&nbsp;are appreciated. Thank you.&nbsp;&nbsp;
0 Kudos
Message 3 of 3
(2,509 Views)