uses DPSCAD_TLB;
var
ASym : IPCsSymbol;
AreaLow, AreaHigh : TPCsPoint3D;
page : IPCsPage;
TheHandle : cardinal;
begin
{check if we're connected to Automation}
if CheckConnection() then // (See function here)
begin
{lets assume the TheHandle have a valid handle to a symbol}
ASymbol := PCsApplication.ActiveDocument.Drawing.GetSymbolFromHandle(-1,TheHandle);
{make the selection only on the coordinate the given symbol is on}
AreaLow := ASym.Position;
AreaHigh := ASym.Position;
{make the page the symbol is on active}
PCsApplication.ActiveDocument.ActivePage := ASymbol.Page;
{call the selection method}
PCsApplication.ActiveDocument.SelectInWindow(AreaLow, AreaHigh,ASymbol.Page,ASymbol.Layer,'');
PCsApplication.Redraw;
end;
end;
var
ASym : IPCsSymbol;
AreaLow, AreaHigh : TPCsPoint3D;
page : IPCsPage;
TheHandle : cardinal;
begin
{check if we're connected to Automation}
if CheckConnection() then // (See function here)
begin
{lets assume the TheHandle have a valid handle to a symbol}
ASymbol := PCsApplication.ActiveDocument.Drawing.GetSymbolFromHandle(-1,TheHandle);
{make the selection only on the coordinate the given symbol is on}
AreaLow := ASym.Position;
AreaHigh := ASym.Position;
{make the page the symbol is on active}
PCsApplication.ActiveDocument.ActivePage := ASymbol.Page;
{call the selection method}
PCsApplication.ActiveDocument.SelectInWindow(AreaLow, AreaHigh,ASymbol.Page,ASymbol.Layer,'');
PCsApplication.Redraw;
end;
end;