LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

saving files in cvi 8.1

I have a weird problem with CVI 8.1.  Basically I am cloning a project A, stored in my c:\A\... to project B, stored in c:B\...  All the file names in the projects are similar, e.g test.c, operation.c etc, except for the main file, they are A.c, A.uir and B.c, B.uir.  
 
When I open file only in B.prj, all the files are saved in c:\B.  As soon as I open a file in c:\A, then all the files are saved in c:\A instead of c:\B, where they are suppose to be.  Now I am so confused and I have no confident as where the files will be saved.  Not only I don't know where my files are and the bigger problem is my files in the original directory c:\A was overwriiten.
 
Can anybody know why is this happened and how to limit the file only save to the active project directory?  I have CVI 8.1, 8.0 and 6.1 in my system, will this be part of the problem?
 
Thanks in advance.
0 Kudos
Message 1 of 4
(3,349 Views)

Question 1: where are my project files located?
Regardless the type of Workspace View you are using (either the integrated or the classic one) show the project tree windo, next click on the project name and then check that in View menu the option Show full pathnames is marked: mark it if it's not. After this, in the project tree you will see the full pathname of every file listed in it, so that you can check that all files related to A.prj are included in A folder and none of them is taken from B folder. This option consumes a lot of video space so it's not activated by default but can be useful in caso of doublt as of where the files are located.

Question 2: how may it happen that a file be moved?
Well, so far I found only a way to do this: use the "File as" option to save a file: this option saves a file with the specified name in the specified folder and adds it in the project or replace with it the previous file you were working on. That is to say: if you open c:\a\a.c, modify it and save as c:\b\b.c, in your a.prj project you will from now using the file in the wrong directory! To prevent this problem use the menu option File >> Save Copy of xxxx As: this will let project file unchanged and will save the file in the new location / with the new name without affecting the project.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 4
(3,339 Views)
Thanks for the advice and I will turn ON the full path display from now on.
 
Concerning the question 2:  I learn it the hard way that if you open a file in a different directory and than use the "Save As.." option, you will replace your file in the active file by another file in a different directory.  I will never do this again. 
 
But now the case is that I only open the file, check for some reference and then close it without saving (at least not to my knowledge).  The file save path has become changed to another directory.  I think this is a program bug in CVI and I will  better not to open files in other directory.
 
0 Kudos
Message 3 of 4
(3,331 Views)

Weel, I have never observed such a strange behaviour. I made some test opening a sample project, opening one of its source files and next opening another source file in c:\temp: I had no problems in saving the project files: simply doing a Ctrl+S saves in the correct directory...

It seems there is something different between your situation and mine: can you define a complete procedure that results in the incorrect saving, so that we can test on our machine?



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 4 of 4
(3,328 Views)