Adds a courtyard to the symbol.

DlxLayer.DrawCourtyard(rect, rotAngle = 0)
DlxLayer.DrawCourtyard(center, sizex, sizey = 0, rotAngle = 0)


Parameter Description
shape A DlxFigure object with the shape.
shapeDef String with the definition of the copper shape. For more information, see Shape Format Specifications.
rect A DlxRect object that specify the copper rectangle.
rotAngle The angle, in degrees, of rotation of the copper with respect to the x-axis.
points Arrays of DlxPoint objects with coordinates of the polygon vertices.
center A DlxPoint object with the coordinates specifying the center of the ellipse.
sizex A positive value that defines the radius of the circle or the half length of the x-axis of the ellipse.
sizey A positive value defining the half length of the y-axis of the ellipse. If zero is specified, sizey is set equal to sizex.

Return Value

The newly created DlxCourtyard object. Call the IsValid() method to determine if the object was created correctly.


This method fails if the layer is not one of the courtyard layers.


  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.GetActivePage();
  if (page.IsValid())
    var layer = page.GetLayerFromType(DlxApp.LAYERTYPE_TOPCOURTYARD);
    if (layer.IsValid())
      var points1 = new Array();
      points1[0] = new DlxPoint(90, 120);
      points1[1] = new DlxPoint(100, 130);
      points1[2] = new DlxPoint(110, 120);
      layer.DrawCourtyard(new DlxRect(40,120,70,160), 0);
      layer.DrawCourtyard(new DlxPoint(140,140), 20);
      page.SelectView("Top Courtyard");

See also