LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

[CVI 2012] Files in project

Hi!

Is there a way to get a list of files that are part of a project?

 

Background: I want to automate some tasks when building my project. This includes running PC-Lint on all sources as well as generating documentation (using doxygen). For this it would be convenient, if I could use CVI's build process to generate a (text) file containing all the files that are part of my project.

 

Regards,

Thorsten

0 Kudos
Message 1 of 5
(2,757 Views)

I don't know if such a function exists, but you could look into your .prj files (which actually are text files, .ini style) and parse their content to extract the informations you want. Files explicitly included in the project (i.e. all files appearing in the project tree) are listed under [File xxxx] sections



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 5
(2,723 Views)

Hi Thorsten

If you can interact with CVI  through its ActiveX interface there is an ActiveX function that might be useful: CVI_AppGetFileNameByIndex.

For an example on how to use CVI through automation you can search for ActiveX in NI Example finder and open cvidemo or you can open it directly in CVI from <CVISampleDir>\activex\cvi.

 

Regards,

Razvan

0 Kudos
Message 3 of 5
(2,716 Views)

Hi Roberto!

Thanks for your answer (and sorry for my late reply, but there was a public holiday in Germany).

I know about the structure of those .prj files. It would of course be possible to parse those, but then: it would be much easier using a windows batch file for this purpose (exception would be if there had been files in the project directories that are not part of the project itself, but this is not the case here).

Best regards,

Thorsten

0 Kudos
Message 4 of 5
(2,691 Views)

Hi Razvan!

This looks quite interesting by itself - never knew of this feature. I've played a bit with those examples and also examined the source code.

Alas, if there isn't a way to exclude those files that are located in several of the subfolders (I've organized files in the project in different folders - see below) or if there isn't a way to only include some of the folders (here: Source Files and Include Files only) I feel this doesn't help me much.

Subfolders.JPG

But many thanks anyway for bringing the ActiveX part to my attention. It might prove helpful in other cases.

Best regards,

Thorsten

0 Kudos
Message 5 of 5
(2,688 Views)