LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Removing diagrams from the VI.lib

After saving a new VI created from other VIs and selecting remove diagram the diagrams from the parent VI.lib have been removed. I don't want to alter the parent VIs only the newly created VIs. What am I doing wrong?
0 Kudos
Message 1 of 8
(4,717 Views)
You have to be careful when you modify a vi and save it as another vi...i find the new vi replaces the parent vi in the whole libary! But there is a way to save the new vi without interfering with the parent vi. I've copied the following from the LV 6.0 help:

"Select File>Save As to save a copy of the VI in memory to disk with a new name you choose. After the save finishes, the VI in memory points to the new version. In addition, all callers to the old VI in memory now refer to the new VI unless you place a checkmark in the Save a copy without updating callers checkbox. If you enter a new name for the VI, the disk version of the original VI is not overwritten or deleted."

So make sure you first Save As, and check the Save a copy without updating callers. The
n you can save the vi again removing diagrams.

Hope this has helped..

Kim
0 Kudos
Message 2 of 8
(4,717 Views)
I find that it does not matter if the "Save a copy without updating callers" box is checked or unchecked it still alters the parent VI. I use a new name and file location. This happens on two different computers and different operating systems. (Win98 & Win2k)
0 Kudos
Message 3 of 8
(4,717 Views)
As long as you are closing the parent vi, and opening the new copy with the new name before you remove diagrams then i dont see why the parent vi is affected. Seems a bit strange to me.

If fact, on just testing now if i 'save with options' a parent vi, as application distribution with removes diagrams and save to a new location, the parent vi still remains intact.

Sorry, it seems i cant really help after all..
0 Kudos
Message 4 of 8
(4,717 Views)

Is there a tool that allows me to remove diagrams in a folder and all subfolders.

 

K.

0 Kudos
Message 5 of 8
(4,384 Views)

Hi Kevin,

 

You probably should have created a new thread instead of replying to an almost 7 year old one.  Nevertheless, you can write a VI that removes diagrams from all VIs in a folder pretty easily by using the "Recursive File List.vi" from the palettes and sending the files array output to a For Loop, where you do an Open VI Reference, Save Instrument (setting "remove diagram" to True), and a Close Reference.  Make sure to backup your source VIs before you do this!  Once you remove a diagram from a VI, there is no way to retrieve it other than restoring from a backup that still has a diagram.

 

-D

Message Edited by Darren on 01-19-2009 11:33 PM
Message 6 of 8
(4,372 Views)
By doing this your labview source code will be locked to your current version. You can not recompile it to a newer version. It is better to use password for code protection


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
Message 7 of 8
(4,364 Views)

Thanks to both for your help!

 

K.

 

0 Kudos
Message 8 of 8
(4,349 Views)