LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I create a new workspace (cws) version?

When working on a CVI project, I often will add new features to the program.  I want to keep the old version, in case I totally screw up the programming and have to start over, so I need to rename it.  In the old CVI (like version 5) I would save the project under the new name, like say "daqtest 2.prj", and then proceed to save the .c and .uir files under their new names and they would be associated with the new project name.  Whenever I opened the new project, the new .c and .uir files would be there. 

 

With the newer CVI with workspace (*.cws) files, I am totally clueless about how to create a new version.  I cant figure out how to rename the .cws file.  And when I try to rename the .prj file and save the *.c and *.uir files like I did before, somehow the old version gets overwritten with the new files.

 

How do you handle making new software versions with the *.cws environment?

 

Thanks,

Joel

0 Kudos
Message 1 of 6
(3,860 Views)
I must admit that I don't rely heavily on workspace facilities, but in simiar cases as yours I simply duplicate the .cws file outside CVI to save previous contents (e.g. naming it "daqtest_old.cws") and then proceed with adaptations to the original one. I assume the same is possible by renaming the duplicate "daqtest2.cws" and launching this one instead of the original one.


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?
Message 2 of 6
(3,840 Views)

If you want to save old versions of projects than the easiest way is simply to create a new project within the existing workspace. For all your source files, use the "save a copy of..." menu option and then add these copied files into the new dummy project. There is no need to manipulate .cws files at all.

 

JR

0 Kudos
Message 3 of 6
(3,838 Views)

Previously when I tried to start a new workspace and add my copied files to it, I got errors saying a file was missing (something like "task in project").  So it sounds like the intentioned operation of the workspace is to have as many projects as you need within that workspace? 

 

If I want to give my customer (which in my case are my colleagues) an upgraded version, I should 1) copy the .prj, .c, .uir files to a new directory using copy as.  2) Rename the files with the new version name.  3) change the name of the uir file in loadpanel, etc, in my program to use the new file. 4) load in the new .prj file in the same .cws workspace.

 

Does that sound right?

 

Joel 

0 Kudos
Message 4 of 6
(3,824 Views)

Yes you can have many projects in the same workspace. From your original query I got the impression that you wanted to keep the older files purely as a back-up, in case things went wrong. In that case, I would create a new project (eg Backup_01), then a "save copy as" on all your source files, to a new directory (eg Backup_01) but keeping the original filenames. Then simply add all these files to your new Backup_01 project and finally do a "save as" on this project to the new directory. No need to rename anything. If you give your colleagues a copy of an entire directory structure, all they need to do is to add the project file to their own workspace - all other associations should be automatic. 

 

JR

0 Kudos
Message 5 of 6
(3,816 Views)

Thanks for your reply.

 

I guess I have my own way of updating and making backups.  Actually I dont make backups.  I make a new version, which means a new project name, program name and uir name.  The old version IS my backup.  For example, if I have  a project called DAQProject.prj, I always name the program with the same name, as in DAQProject.c, and the uir DAQProject.uir.  When I make a new version, the .uir file will also have changes, so everything needs to be renamed.  For example DAQProject2.prj, DAQProject2.c and DAQProject2.uir.   If I dont rename everything, then I might get the new files mixed up with the old files, and that could be a mess.

 

Does this make any sense?  I'd like to know how others keep track of new versions.

 

Thanks,

Joel 

0 Kudos
Message 6 of 6
(3,813 Views)