uses DPSCAD_TLB;
var
PCsApplication : IPCsApplication;
ADocument : IPCsDocument;
APage : IPCsPage;
begin
PCsApplication := coApplication.Create();
{active project}
ADocument := PCsApplication.ActiveDocument;
{create page}
APage := ADocument.Drawing.Pages.Add(pf_Normal,'');
{set pagefunction}
APage.PageFunction := pf_Normal;
{set title}
APage.Title := 'Page Title';
{set pagetype}
APage.PageType := pt_Schematic;
{set specific pagetab-name}
Apage.PageNumber := 'Specific tabname';
{or make pagetab-name, the current pagenumber}
Apage.PageNumber := IntToStr(ADocument.Drawing.Pages.Count);
{update drawing in Automation through IPCsApplication}
PCsApplication.Redraw;
end;
var
PCsApplication : IPCsApplication;
ADocument : IPCsDocument;
APage : IPCsPage;
begin
PCsApplication := coApplication.Create();
{active project}
ADocument := PCsApplication.ActiveDocument;
{create page}
APage := ADocument.Drawing.Pages.Add(pf_Normal,'');
{set pagefunction}
APage.PageFunction := pf_Normal;
{set title}
APage.Title := 'Page Title';
{set pagetype}
APage.PageType := pt_Schematic;
{set specific pagetab-name}
Apage.PageNumber := 'Specific tabname';
{or make pagetab-name, the current pagenumber}
Apage.PageNumber := IntToStr(ADocument.Drawing.Pages.Count);
{update drawing in Automation through IPCsApplication}
PCsApplication.Redraw;
end;