ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Core.Geometry Namespace / EllipticArcBuilderEx Class / EllipticArcBuilderEx Constructor / EllipticArcBuilderEx Constructor(Coordinate2D,Double,ArcOrientation,SpatialReference)
The center of the circle.
The radius of the circle.
The orientation of the arc, clockwise or counterclockwise.
(Optional) The spatial reference of the arc. The default value is null.
Example

In This Topic
    EllipticArcBuilderEx Constructor(Coordinate2D,Double,ArcOrientation,SpatialReference)
    In This Topic
    Creates a new instance of the EllipticArcBuilderEx class. The new instance will be a circle from a center point and radius.
    Syntax

    Parameters

    centerPt
    The center of the circle.
    radius
    The radius of the circle.
    orientation
    The orientation of the arc, clockwise or counterclockwise.
    spatialReference
    (Optional) The spatial reference of the arc. The default value is null.
    Exceptions
    Remarks
    The start and end point of the circle are equal and are located at the top of the circle.
    Example
    Construct a Circle
    {
      // Construct a circle with center at (-1,-1), radius = 2, and oriented clockwise.
      // Use a builderEx convenience method or use a builderEx constructor.
    
      Coordinate2D centerPtCoord = new Coordinate2D(-1, -1);
    
      // Builder convenience methods don't need to run on the MCT.
      EllipticArcSegment circle = EllipticArcBuilderEx.CreateCircle(centerPtCoord, 2, ArcOrientation.ArcClockwise);
      // circle.IsCircular = true
      // circle.IsCounterClockwise = false
      // circle.IsMinor = false
    
      double startAngle, rotationAngle, centralAngle, semiMajor, semiMinor;
      Coordinate2D actualCenterPt;
      circle.QueryCoords(out actualCenterPt, out startAngle, out centralAngle, out rotationAngle, out semiMajor, out semiMinor);
    
      // semiMajor = 2.0
      // semiMinor = 2.0
      // startAngle = PI/2
      // centralAngle = -2*PI
      // rotationAngle = 0
      // endAngle = PI/2
    
      // This EllipticArcBuilderEx constructor doesn't need to run on the MCT.
      EllipticArcBuilderEx builder = new EllipticArcBuilderEx(centerPtCoord, 2, ArcOrientation.ArcClockwise);
      EllipticArcSegment otherCircle = builder.ToSegment();
    }
    Create Circle Text Element
    {
      //Note: Must be on QueuedTask.Run(() => { ...
      //Build geometry
      Coordinate2D center = new Coordinate2D(4.5, 4);
      var eabCir = new EllipticArcBuilderEx(center, 0.5, ArcOrientation.ArcClockwise);
      var cir = eabCir.ToSegment();
    
      var poly = PolygonBuilderEx.CreatePolygon(
        PolylineBuilderEx.CreatePolyline(cir, AttributeFlags.AllAttributes));
    
      //Set symbology, create and add element to layout
      CIMTextSymbol sym = SymbolFactory.Instance.ConstructTextSymbol(
                      ColorFactory.Instance.GreenRGB, 10, "Arial", "Regular");
      string text = "Circle, circle, circle";
    
      GraphicElement cirTxtElm = ElementFactory.Instance.CreateTextGraphicElement(
        layout, TextType.CircleParagraph, poly, sym, text, "New Circle Text", false);
    }
    Create Ellipse Text Element
    {
      //Note: Must be on QueuedTask.Run
    
      //Build geometry
      Coordinate2D center = new Coordinate2D(4.5, 2.75);
      var eabElp = new EllipticArcBuilderEx(center, 0, 1, 0.45, ArcOrientation.ArcClockwise);
      var ellipse = eabElp.ToSegment();
    
      var poly = PolygonBuilderEx.CreatePolygon(
        PolylineBuilderEx.CreatePolyline(ellipse, AttributeFlags.AllAttributes));
    
      //Set symbology, create and add element to layout
      CIMTextSymbol sym = SymbolFactory.Instance.ConstructTextSymbol(
                            ColorFactory.Instance.BlueRGB, 10, "Arial", "Regular");
      string text = "Ellipse, ellipse, ellipse";
    
      GraphicElement ge = ElementFactory.Instance.CreateTextGraphicElement(
        layout, TextType.PolygonParagraph, poly, sym, text, "New Ellipse Text", false);
    }
    Create Predefined Shape Graphic Element 3
    {
      //Note: Must be on QueuedTask.Run
    
      //Build geometry
      Coordinate2D center = new Coordinate2D(2, 2.75);
      var eabElp = new EllipticArcBuilderEx(
                               center, 0, 1, 0.45, ArcOrientation.ArcClockwise);
      var ellipse = eabElp.ToSegment();
    
      //Set symbology, create and add element to layout
      CIMStroke outline = SymbolFactory.Instance.ConstructStroke(
                            ColorFactory.Instance.GreenRGB, 2.0, SimpleLineStyle.Dot);
      CIMPolygonSymbol ellipseSym = SymbolFactory.Instance.ConstructPolygonSymbol(
                       ColorFactory.Instance.GreyRGB, SimpleFillStyle.Vertical, outline);
    
      var poly = PolygonBuilderEx.CreatePolygon(
        PolylineBuilderEx.CreatePolyline(ellipse, AttributeFlags.AllAttributes));
    
      var ge = ElementFactory.Instance.CreatePredefinedShapeGraphicElement(
        layout, PredefinedShape.Ellipse, poly.Extent.Center, 0, 0, ellipseSym,
        "New Ellipse2", false, new ElementInfo() { Anchor = Anchor.TopRightCorner });
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also