Creates an angular dimension for an arc, two lines, or a circle.

syntaxSyntax:
DlxLayer.DrawAngularDimension(center, firstPoint, secondPoint, height, textOffset = 0)

Parameters

Parameter Description
center A DlxPoint object with the coordinates specifying the center of the circle or arc, or the common vertex between the two dimensioned lines.
firstPoint A DlxPoint object with the coordinates specifying the point through which the first extension line passes.
secondPoint A DlxPoint object with the coordinates specifying the point through which the second extension line passes.
height Height of the dimension line.
textOffset Specifies the angle in degrees to the bisector of the arc angle in which the text is to be placed.

Return Value

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

Remarks

The center is the center of the circle or arc, or the common vertex between the two lines being dimensioned. FirstPoint and SecondPoint are the points through which the two extension lines pass.

Example

  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", false);
}
if (doc.IsValid() && doc.Activate())
{
  var page = doc.GetActivePage();
  if (page.IsValid())
  {
    var layer = page.GetLayerFromType(DlxApp.LAYERTYPE_DRAWING);
    if (layer.IsValid())
    {
      var center = new DlxPoint(80, 80);
      var arc = layer.DrawEllipse(center, 30, 30, 0, 45);
      layer.DrawAngularDimension(center, arc.GetStartPoint(), arc.GetEndPoint(), 10);
    }
  }
}

See also