We add some aux funtions in 0.9.7.598 nightly build. If this version installed, below script can be used to walk all module files from the project group.
{*******************************************************}
{ }
{ Pascal Script Source File }
{ Run by RemObjects Pascal Script in CnWizards }
{ }
{ Generated by CnPack IDE Wizards }
{ }
{*******************************************************}
program WalkingAllFiles;
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;
var
PG: IOTAProjectGroup;
P: IOTAProject;
I, J, C1, C2: Integer;
begin
PG := CnOtaGetProjectGroup;
if PG = nil then
begin
Writeln('NO ProjectGroup. Exit.');
Exit;
end;
C1 := CnOtaGetProjectCountFromGroup();
Writeln('ProjectGroup got. Count ' + IntToStr(C1));
for I := 0 to C1 - 1 do
begin
P := CnOtaGetProjectFromGroupByIndex(I);
if P <> nil then
begin
Writeln('Project ' + IntToStr(I) + '. Project File Name ' + P.GetFileName);
C2 := CnOtaGetModuleCountFromProject(P);
Writeln('Project ' + IntToStr(I) + '. Project Module Count ' + IntToStr(C2));
for J := 0 to C2 - 1 do
Writeln('Project ' + IntToStr(I) + ' . File ' + IntToStr(J) +
'. File Name ' + CnOtaGetModuleFromProjectByIndex(P, J).GetFileName);
end;
end;
end.
|