LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to rename project (.prj) and workspace (.cws) files?

CVI lets me rename a project in the programming environment (Edit -> Project) but the name of the project file on disk (.prj) doesn't change. Is there a way to change the project file name?

 

I want to do the same thing for the workspace file (.cws). How?

 

thanks!

0 Kudos
Message 1 of 10
(6,222 Views)

There actually isn't an option to allow renaming prj and cws files: as they are simple text files, for small projects  you can handle them manually with a text editor and simple OS functions.

However, there is an idea posted in the LabWindows/CVI Idea Exchange that suggests the addition of a "Save as development distribution" function, that could help you in this respect. Feel free to kudos that idea and / or comment on it to add your opinions and wishes.



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 10
(6,213 Views)

Thanks Roberto. At least I can stop looking in the CVI environment for a solution.

 

As a novice CVI programmer I use the CVI examples a lot. Sometimes I even use the example code as a starting point for my own code. But I haven't found a clean way to move the examples to another folder. I think I may have actually modified some of the example code before I figured out what was happening. Not good!

 

Sometimes I want to open a random C file so I can copy and paste code into my program. But the CVI environment wants to make that random C file part of the project, I believe. If I recall correctly, it even changes my default folder to the location of the random C file. Very frustrating!

 

Oh well, I guess that's just the way it is. Seems like a major omission to me.

 

thanks!

0 Kudos
Message 3 of 10
(6,206 Views)

querty999 ha scritto:

Sometimes I want to open a random C file so I can copy and paste code into my program. But the CVI environment wants to make that random C file part of the project, I believe. If I recall correctly, it even changes my default folder to the location of the random C file. Very frustrating!


The highlighted sentence is not true: you can open any number of source files in the editor without having them added to the project; the same happens for include files and for any text file you want. The CVI environment will remember you have those files open and will try to open them again the next time you run it, but they won't be included in the compilation and won't be part of your application / 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 4 of 10
(6,186 Views)

 

CVI would ask you to add an external C file to your project only if you try to compile it.

 

S. Eren BALCI
IMESTEK
0 Kudos
Message 5 of 10
(6,171 Views)

 


ebalci ha scritto:

 

CVI would ask you to add an external C file to your project only if you try to compile it.

 


...but only if you are actually calling functions in that C file, if I'm not wrong!

 



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 6 of 10
(6,166 Views)

Roberto,

 

Thanks for correcting my mistake. Unfortunately it it throws me back into a state of confusion. I thought I had isolated what causes CVI sessions to switch folders. But now I don't know what does it. All I know is that sometimes when working in CVI I find files being saved and opened in a folder other than the one I started in.

 

Anyway, it's a relatively minor irritation in an otherwise wonderful application. I'll just have to pay more attention.

 

The workspace/project thing is the most confusing concept in the CVI programming environment. I've wondered if CVI is designed work like MS Visual Studio. That way it would be familiar to VS programmers. But prior to CVI I'd never used VS or any other IDE so it's all foreignd to me.

0 Kudos
Message 7 of 10
(6,136 Views)

I have never observed that CVI changes the location of a file while working in the IDE. It may happen that if you mode a project or part of it to another folder it tries to fix paths for files that can no more be located in the project folder: this event is normally evidenced by a warning message when you open CVI.

 

In any case, clicking in the project tree area and selecting View >> Show full pathnames menu option you can see the exact location where project files are stored: in case a path is wrong you will need to save a copy of the mislocated file to the correct location, unload it from the project and reload the correct 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?
0 Kudos
Message 8 of 10
(6,131 Views)

I am trying to rename the exsisting project and files on dias. As the post mention

"as they are simple text files, for small projects  you can handle them manually with a text editor and simple OS functions"

What OS functions are being referred?

I have a large project and need to rename the files on disk. Started with creating a new project and workspace but now has a lot of Project link errors - undefined symbols?


*************************************************
CLD
*************************************************
0 Kudos
Message 9 of 10
(5,793 Views)

Fixed, need to load the instruments - thanks!

*************************************************
CLD
*************************************************
0 Kudos
Message 10 of 10
(5,789 Views)