Discussion:
Save Options a Bit Confusing
(too old to reply)
tmunsell
2008-08-08 06:10:16 UTC
Permalink
Hi, I've been using LabVIEW for about 7 months now, and am still a bit confused about the save options.  It seems that whenever I modify a sub-VI for my app, the previous sub-VI I created ends up with the same settings that I changed in the newly modified one.Example:  I use an existing VI created by Daytronic Corp for monitoring a binary signal.  I change the channel and a few other settings, and name the file oil press.vi, saving it in the new folder I created for my app.  Then I close the oil press.vi I modified, then close the original, unchanged VI without saving it.  When I create another VI starting with the original, unmodified one again, and save it using the same procedure, but using a different filename (let's call it fuel press.vi), oil press.vi takes on the characteristics of fuel press.vi, although the filename is still oil press.vi.  So, I end up having to use the "replace" option on the block diagram and select oil press.vi as the replacement file.  I have to keep doing this for every sub-vi I create.This take a lot of time and is a bit annoying.I hope you can understand what I'm saying.  The Save options seem confusing to me, with all the references to keeping a vi in memory, closing the original, etc.  Is there some text or a tutorial online that explains the save options in a simpler, more direct form?  I have even read about it in my book (Labview for Everyone) and it doesn't go into much more detail about how saving the Vis actually works.Thanks!
MikeS81
2008-08-08 08:10:05 UTC
Permalink
Hi Todd,
the described behavior should only come, if you save the caller vi of your changed subvi. If you have a vi with a subvi in it and you open the subvi and save it under a new name, then the main vi will update the path to the new saved vi and change the link to the new one. From your description a think you use LabVIEW 7, in LabVIEW 8 you have more options. To handle it in LV7 you can create first your copy and work on it or you open only the vi, which you want to save with a new name.
Hope it helps.Mike
tmunsell
2008-08-09 06:10:05 UTC
Permalink
Hi Mike,Actually, I'm using LV 8.5.  It's the descriptions of the save options that are slightly confusing.  The information about what's left in memory and what's closed and opened is what's got me baffled.For example, what, in layman's terms, do each of these options below mean... exactly?  I would think that an option that simply says "Save as path/filename" would be enough.  Then, the renamed, saved file stays open, since that's the one that's currently being used, and the original is closed and left as it was.  Which option (and sub-option) would I choose to do this?The number of options below seems a bit excessive, and not very clearly defined, at least to me. :)  Even the explanation in the book "LabVIEW for Everyone", which is supposed to be for beginners, doesn't do a very good job of describing exactly what each option does.  Thanks again!- Original file?Displays the path to the open file. You can
use this field to determine the location of a file on disk.

- Copy?Creates and saves a copy of the file in memory to disk with a name you
choose. If you enter a new file path or name for the file, the original file on
disk is not overwritten or deleted.
- Substitute copy for original?Both the original file and the
new file exist on disk, but the original VI closes and the new VI opens. Use
this option if you
want to create a copy of the original file and immediately edit the copy.



<img src="caution.gif">
Caution&nbsp;&nbsp;If the original file has
calling VIs in memory, this option updates all these callers to refer to the new
file.If the original file is in a project
library or project, this option substitutes the new file for the original in the
project library or project.

- Create unopened disk copy?Both the original file and the
new file exist on disk, but only the original file remains open in memory. Use
this option if you
want to create a copy of the original file but continue editing the original
file, for example, if you want to create a backup copy. This option does not update
callers in memory to refer to the new file. You can update callers manually by
<a href="lvhowto.chm::/FindingAllInstancesOfVI.html" target="_blank">finding all instances of a
VI</a> and updating the name of each instance. If the original file is in a
library or project, this option does not add the new file to the same library or
project.

- Open additional copy?Both the original file and the new
file exist on disk and are open in memory. You must give the copy a new name,
because two files of the same name cannot exist in the same application instance
at the same time. Use this option if you want to create a copy of the original file,
continue editing the original file, and also immediately edit the new file. This
option does not
update callers in memory to refer to the new file. You can update callers
manually by <a href="lvhowto.chm::/FindingAllInstancesOfVI.html" target="_blank">finding all
instances of a VI</a> and updating the name of each instance. If the original
file is in a library or project, you have the option of adding the new
file to the same library or project by placing checkmarks in the appropriate
checkboxes. If you place a checkmark in the checkbox to add the copy to the
library, the checkbox to add the copy to the project is disabled and
unchecked.


- Rename?Renames the file in memory with a new name you
choose. This option
closes and deletes the original file and opens the file with the new name, so
only the new file exists on disk and in memory. Use this option if you want to
change the name and/or location of the original file.



<img src="caution.gif">
Caution&nbsp;&nbsp;If the original file has
calling VIs in memory, this option updates all these callers to refer to the new
file.If the original file is in a library or
project, th
Karunya_R
2008-08-11 21:40:06 UTC
Permalink
Hi Todd,

I understand there are a lot of options for saving.

If I understand your question correctly, you want to create a copy of
an existing file, close the original and keep the copy open and edit
the copy. In this case you will use substitute copy for original. When you do select this open, the copy will have to have a different name.
Do you have any specific questions on when you would use which option?
tmunsell
2008-08-12 02:10:06 UTC
Permalink
I think that is the option I have needed.&nbsp; So, if I understand that option correctly, I would open the sub-vi that I want to edit, save it immediately (before editing it) under a new path and filename, then edit it.&nbsp; Is that correct?&nbsp; Will this prevent the previously edited/saved vi's options from changing to match the most recently saved one?I'm still baffled about what the other options do and when you would have to use them.&nbsp; As I said before, the help and the book I have don't go into much detail or give examples.Thanks!Message Edited by tmunsell on 08-11-2008 10:01 PM
Karunya_R
2008-08-13 00:10:05 UTC
Permalink
Hi Todd, You just have to open the Sub-VI make changes to it, and then select the save as option to specify to save the changes made is for the copy file and not for the original. For this you would use the Substitute copy for original. You don't have to save it immediately after you open the VI.- Create unopened disk copy - This option is the opposite of Substitute original for copy where you create a copy of the original and close that one. The original is going to be open and you can continue to make changes to the original itself.
- Open additional copy- This is when you have both the copy and original open at the same time. The copy must have a new name. You will use this when you want to create variants from the same VI (or original VI).&nbsp;
- - Rename? Renames your original file. It is just going to keep the newly named file open.

-
- I understand this can get a little confusing. Please feel to post back if you have questions about this!-
tmunsell
2008-08-13 07:40:20 UTC
Permalink
Thanks for the reply.Ok, I have used the save as option, saving it as the copy file.&nbsp; Then, after editing it, I close it and select save again.Now, the original vi is still visible (was behind the saved one).&nbsp; So I suppose that I have to close this without saving.&nbsp; Am I correct?I guess what is confusing me is the options of having the original sub-vi still in memory, the saved sub-vi still in memory, etc.&nbsp; If I am creating a new app, why would I want to keep the original, unedited sub-vi in memory?&nbsp; I would expect LV to remove the original from memory right away when I close it after saving the new one, since that's the sub-vi I'm currently using.&nbsp; Sorry, but I've just never seen a program with so many different save options, and not much in the way of complete explanations of what each of them do, and when you'd want to use them. :)Thanks again,Message Edited by tmunsell on 08-13-2008 02:54 AM
Karunya_R
2008-08-13 21:10:05 UTC
Permalink
Hi Todd,&nbsp;When you use the substitute copy for original, the original copy is supposed to get closed and only the copy is kept open. So you can edit the copy and the original remains&nbsp; unchanged. I am not sure how the original VI is still visible in this option. The substitute copy for original does remove the original from memory.&nbsp; In the case of create unopened disk copy, the original still remain in memory because that is one that you editing. And in the case of Open additional copy, both remain in memory because you are editing both (copy + original) at the same time. &nbsp;Does this explain this better?&nbsp;P.S:- Sorry about the bold back and forth. I can't seem to fix it.&nbsp; &nbsp;&nbsp;&nbsp;
Loading...