ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Core.Geometry Namespace / EllipticArcBuilderEx Class / EllipticArcBuilderEx Constructor / EllipticArcBuilderEx Constructor(Coordinate2D,Double,Double,Double,Double,Double,SpatialReference)
The center point of the elliptic arc.
The start angle in radians measured from the rotated X-axis.
The central angle in radians measuring the span of the arc from startAngle to endAngle. A positive value corresponds to counterclockwise orientation.
The angle in radians by which the ellipse is rotated from the X-axis. A positive value corresponds to counterclockwise rotation.
The length of the semi-major axis.
The ratio of the length of the semi-minor axis to the length of the semi-major axis. The absolute value must be <= 1.
(Optional) The spatial reference of the arc. The default value is null.
Example

In This Topic
    EllipticArcBuilderEx Constructor(Coordinate2D,Double,Double,Double,Double,Double,SpatialReference)
    In This Topic
    Creates a new instance of the EllipticArcBuilderEx class. The new instance will be an elliptic arc.
    Syntax

    Parameters

    centerPt
    The center point of the elliptic arc.
    startAngle
    The start angle in radians measured from the rotated X-axis.
    centralAngle
    The central angle in radians measuring the span of the arc from startAngle to endAngle. A positive value corresponds to counterclockwise orientation.
    rotationAngle
    The angle in radians by which the ellipse is rotated from the X-axis. A positive value corresponds to counterclockwise rotation.
    semiMajorAxis
    The length of the semi-major axis.
    minorMajorRatio
    The ratio of the length of the semi-minor axis to the length of the semi-major axis. The absolute value must be <= 1.
    spatialReference
    (Optional) The spatial reference of the arc. The default value is null.
    Exceptions
    ExceptionDescription
    startAngle, centralAngle, rotationAngle, semiMajorAxis or minorMajorRatio is NaN.
    An elliptic arc construction operation was given invalid axes. The absolute value of minorMajorRatio is > 1.
    centerPt is empty.
    Remarks
    If minorMajorRatio is equal to one, then a circular arc will be created and the rotation angle will be equal to zero.
    Example
    Construct an Elliptic Arc - using a center point and rotation angle
    {
      // Construct an elliptic arc centered at (1,1), startAngle = 0, centralAngle = PI/2, 
      // rotationAngle = 0, semiMajorAxis = 1, minorMajorRatio = 0.5.
      // Use a builderEx convenience method or use a builderEx constructor.
    
      Coordinate2D centerPt = new Coordinate2D(1, 1);
    
      // BuilderEx convenience methods don't need to run on the MCT.
      ellipticArcSegment = EllipticArcBuilderEx.CreateEllipticArcSegment(centerPt, 0, Math.PI / 2, 0, 1, 0.5);
    
      double semiMajor;
      double semiMinor;
      ellipticArcSegment.GetAxes(out semiMajor, out semiMinor);
      // semiMajor = 1, semiMinor = 0.5
    
      // BuilderEx constructors don't need to run on the MCT.
      EllipticArcBuilderEx ellipticArcBuilderEx = new EllipticArcBuilderEx(centerPt, 0, Math.PI / 2, 0, 1, 0.5);
      ellipticArcBuilderEx.GetAxes(out semiMajor, out semiMinor);
      EllipticArcSegment arcSegment = ellipticArcBuilderEx.ToSegment();
    }
    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