Net highlighting

Hi!
Is there any code example for the script engine for highlighting nets by their name on top and bottom layer?

Forums: 

Hi,

there are more than one way to do that, here two examples:

int netNr = step1.GetNetNrFromNetName("Netname"); //relevant net

IODBLayer topSignalLayer = step1.GetOutsideODBLayer(true); //get top signal layer

foreach (IODBObject obj in topSignalLayer.GetAllLayerObjects())
{
if (obj.PcbNetNumber == netNr)
obj.ObjectColor = System.Drawing.Color.Aqua;
}

INet net = step1.GetNet("Netname"); //use INet objects

foreach (IODBObject obj in net.GetAllObjectsOn("Layername", parent)) //net object knows all objects and gives you all for one layer
{
obj.Select(true);
}
parent.UpdateView();

Hope this is was you need.
Regards
Fabio

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.