Creates a diametric dimension for a circle or arc given the two points.

DlxLayer.DrawDiametricDimension(center, p1, textPos = 0)


Parameter Description
center A DlxPoint object with the coordinates specifying the center of the circle
p1 A DlxPoint object with the coordinates specifying the diameter point on the circle.
textPos Specifies the position of the text. A value below zero moves the text away from the mirror point to point p1. A value greater than zero moves the text away from point p1. A value of zero places the text in the center of the dimension line.

Return Value

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


Different types of diameter dimensions are created depending on the size of the circle and the length of the text line.


  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);
      layer.DrawDiametricDimension(center, center.CirclePoint(30, 30));

See also