LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why do all instances of a sub VI get replaced when I do a "Save As" to make a new sub VI?

Hi all,
 
I am wondering how to avoid an obnoxious problem with overwriting sub VI references.  If I have a main VI open and I open a sub VI, edit it, and do a "Save As" because I want to create a new VI with slightly different functionality, why does the main VI change ALL of the references that used to point to the original, to now point to the new sub VI?  I would expect that with a "Save" command, but not a "Save As".  How can I avoid this problem?  Any ideas?
 
Thanks,
 
Jason
0 Kudos
Message 1 of 4
(2,654 Views)
Check the box at the bottom that says" Save a copy without updating callers".  This assumes that you are using LabVIEW 7+

Paul
0 Kudos
Message 2 of 4
(2,649 Views)
It may not be exactly the same implementation in previous versions, but the same principle idea is in all versions.

Paul
0 Kudos
Message 3 of 4
(2,636 Views)
This has to do with the way LabVIEW manages it application memory space.

Since LabVIEW maintains only a single reference to a VI no matter how many times it is used, if you change one you change them all. This includes saving because it doesn't separate out that single reference unless you tell it to.

I think NI had to make a guess as to which way would be best as the default action. Sometimes you want all of them updated with the new version, sometimes not. Although I have to admit that most of the time I'm modifing that instance because that particular one needs to be different from the others. So maybe it was a bad guess on NIs part for this action.

I ended up making a small utility that emulates the "Save a copy without updating callers" function that Paul mentioned. If you save the attached library to a directory called 'Wizard" under your root 'LabVIEW x.x' directory, you'll have a new entry called "Save Copy As...". Selecting this will let you save that instance with a new name without having to remember to check that little box in the dialog.

This is built in 6.1, but works fine in 7.0 and 7.1. Just mass compile it before you run it.

Ed


Message Edited by Ed Dickens on 10-11-2005 03:27 PM



Ed Dickens - Certified LabVIEW Architect
Lockheed Martin Space
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
Download All
Message 4 of 4
(2,616 Views)