Set the parameters for the paste mask.

syntaxSyntax:
DlxPadStyle.SetPasteMask(mode = DlxApp.PASTEMASK_STANDARD, exp = -0.025)

Parameters

Parameter Description
mode Set the mode for the top layer of the PCB. Specify one of the following values:
DlxApp.PASTEMASK_STANDARD Indicates that for this type of pad the shape for the paste mask is adjusted by the value set in the Project.
DlxApp.PASTEMASK_FREE Indicates that welding paste must not be applied to this type of pad.
DlxApp.PASTEMASK_COVERED Indicates that for this type of pad the shape for applying the solder paste corresponds to the shape of the pad, expanded according to the value specified for the parameter Expansion. Typically, the shape of the solder paste is smaller than that of the pad.
exp Specify how much the pad outline should be expanded to create the template for the solder paste. Typically, the shape of the solder paste is smaller than that of the pad.

Return Value

If the operation ends correctly, it returns true otherwise 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 padstyle = new DlxPadStyle();
      padstyle.SetShape(DlxApp.LAYERTYPE_ALLPCBLAYERS, DlxApp.PADSHAPE_ROUNDED, 1.5, 2.0, 0.5);
      padstyle.SetHole(0);
      padstyle.SetPasteMask(DlxApp.PASTEMASK_COVERED, -0.2);
      layer.DrawPad(new DlxPoint(100,150), padstyle, "1");
    }
  }
}

See also