Sets the style for the pads.
|  Syntax: | 
|---|
| DlxPadStyle.SetStyle(name) DlxPadStyle.SetStyle(handle) DlxPadStyle.SetStyle(style) | 
Parameters
| Parameter | Description | 
|---|---|
| name | A string containing the name of the public style. | 
| handle | A string containing the handle of the public style. | 
| style | A DlxPadStyle object from which to copy the style. | 
Return Value
If the operation ends correctly, it returns true otherwise it returns false.
Remarks
The style handle is a 27-character alphanumeric string and appears in the box at the bottom of the Style Manager dialog box.
Example
|  Copy code | |
|---|---|
| var prj = DlxApp.GetJob().GetProject("Example PCB");
if (!prj.IsValid())
  prj = DlxApp.GetJob().NewProject("Example PCB");
var doc = prj.GetDocument("Examples PCB", DlxApp.DOCTYPE_PCB);
if (!doc.IsValid())
{
  doc = prj.NewDocument("Examples Pcb", DlxApp.DOCTYPE_PCB);
  doc.SetPageFormat("A4", false);
  var page = doc.NewPage("PCB", 0, true);
  page.LoadLayerStack("2 layer pcb stackup.clxlys");
  page.DrawBoard(new DlxRect(10, 10, 290, 200));
  page.SelectView("Draw Copper From Top");
}
if (doc.IsValid() && doc.Activate())
{
  var page = doc.FindPage("PCB");
  if (page.IsValid() && doc.SelectPage(page))
  {
    var layer = page.GetLayerFromType(DlxApp.LAYERTYPE_TOPCOPPER);
    if (layer.IsValid())
    {  
      var padstyle = new DlxPadStyle();
      padstyle.InitPadSMD(1.5, 2.0);
      layer.DrawPad(new DlxPoint(100,150), padstyle, "1", 0);
      padstyle.SetStyle("#0000000000000004S107ZZZZZZ");
      layer.DrawPad(new DlxPoint(120,150), padstyle, "2", 0);
    }
  }
} | |
