Check if the style is for SMD.

syntaxSyntax:
DlxPadStyle.IsSMD()

Return Value

If the style describes a pad without a hole it returns true. If the style describes a pad through hole it returns false.

Example

  Copy codeCopy 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 padstyle1 = new DlxPadStyle();
      padstyle1.InitPadSMD(1.5, 2.0);
      DlxApp.Printf("The style 1 is %sfor SMD.", padstyle1.IsSMD() ? "" : "not ");

      var padstyle2 = new DlxPadStyle();
      padstyle2.InitPadFromLead(0.8);
      DlxApp.Printf("The style 2 is %sfor SMD.", padstyle2.IsSMD() ? "" : "not ");
    }
  }
}

See also