0

I use Altium 17 to write delphi scripts I want to set net color, but i got some problem. when code run to info.netcolor, showing undeclared identifier.

how to fix it?

procedure TForm1.Button17Click(Sender: TObject);
var
  WS      : IWorkspace;
  project : IProject;
  doc     : Idocument;

  Info    : Inetinfo;

begin
    WS  := GetWorkspace;
    If WS = Nil Then Exit;

    project := WS.DM_FocusedProject;
    If project = Nil Then Exit;

    project.DM_Compile;

    Doc := WS.DM_FocusedDocument;

    Info := project.DM_NetInfoByName('B-');

    Info.Netcolor := $00FFFF6E;

end;

netColor is a property of InetInfo.

enter image description here

I have been searching on Google for a long time but have not found an answer. Please tell me how to solve it thanks.

Stephen
  • 23
  • 2

0 Answers0