Adds an elliptical arc to the shape.

DlxFigure.AddArc(center, sizex, sizey=0, startAngle=0, stopAngle=360, bCW=false)


Parameter Description
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 horizontal axis of the ellipse.
sizey A positive value defining the half length of the vertical axis of the ellipse. If zero is specified, sizey is set equal to sizex.
startAngle The angle, in degrees, of the arc start.
stopAngle The angle, in degrees, of the end of the arc.
bCW Specify true to draw the arc clockwise, or false to draw the arc counterclockwise.

Return Value

If the operation ends correctly it returns true otherwise it returns false.


  Copy codeCopy code
var prj = DlxApp.GetJob().GetProject("Example Sch");
if (!prj.IsValid())
  prj = DlxApp.GetJob().NewProject("Example Sch");
var doc = prj.GetDocument("Examples Sch", DlxApp.DOCTYPE_SCHEMATIC);
if (!doc.IsValid())
  doc = prj.NewDocument("Examples Sch", DlxApp.DOCTYPE_SCHEMATIC);
  doc.SetPageFormat("A4", true);
if (doc.IsValid() && doc.Activate())
  var page = doc.GetActivePage();
  if (page.IsValid())
    var layer = page.GetLayerFromType(DlxApp.LAYERTYPE_DRAWING);
    if (layer.IsValid())
      // draw shape
      // draw shape
      var andShape = layer.DrawShape();
      var figure = andShape.GetFigure();
      figure.AddPoint(new DlxPoint(95,153.75));
      figure.AddPoint(new DlxPoint(101.25,153.75));
      figure.AddPoint(new DlxPoint(101.25,146.25), -180);
      figure.AddPoint(new DlxPoint(95,146.25));

See also