05-24-2017 10:54 AM - edited 05-24-2017 10:56 AM
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
05-25-2017 02:32 AM
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
05-25-2017 03:46 AM
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
05-29-2017 04:13 AM
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
05-29-2017 04:48 AM
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.
But many thanks anyway for bringing the ActiveX part to my attention. It might prove helpful in other cases.
Best regards,
Thorsten