uses DPSCAD_TLB;
var
PCsApplication : IPCsApplication;
Page : IPCsPage;
Rect : TPCsRect;
i : integer;
begin
PCsApplication := coApplication.Create();
{if you want to use the currently active page}
Page := PCsApplication.ActiveDocument.ActivePage;
{if you want to specificly select a page}
Page := PCsApplication.ActiveDocument.Drawing.Pages[integer];
{running through all symbols on a page, and show the dimensions of them}
for i := 0 to Page.Symbols.Count - 1 do
begin
Rect := Page.Symbols[i].GetRect(rt_Raw);
Memo1.lines.add( 'Fullname=' + Page.Symbols[i].FullName +
' Left=' + Rect.Left +
' Top=' + Rect.Top +
' Right=' + Rect.Right +
' Bottom=' + Rect.Bottom)
end
end;
var
PCsApplication : IPCsApplication;
Page : IPCsPage;
Rect : TPCsRect;
i : integer;
begin
PCsApplication := coApplication.Create();
{if you want to use the currently active page}
Page := PCsApplication.ActiveDocument.ActivePage;
{if you want to specificly select a page}
Page := PCsApplication.ActiveDocument.Drawing.Pages[integer];
{running through all symbols on a page, and show the dimensions of them}
for i := 0 to Page.Symbols.Count - 1 do
begin
Rect := Page.Symbols[i].GetRect(rt_Raw);
Memo1.lines.add( 'Fullname=' + Page.Symbols[i].FullName +
' Left=' + Rect.Left +
' Top=' + Rect.Top +
' Right=' + Rect.Right +
' Bottom=' + Rect.Bottom)
end
end;