ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Core.Geometry Namespace / EllipticArcBuilderEx Class / EllipticArcBuilderEx Constructor / EllipticArcBuilderEx Constructor(Coordinate2D,Double,Double,Double,ArcOrientation,SpatialReference)
The center point of the ellipse.
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.
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,Double,Double,ArcOrientation,SpatialReference)
    In This Topic
    Creates a new instance of the EllipticArcBuilderEx class. The new instance will be an ellipse.
    Syntax

    Parameters

    centerPt
    The center point of the ellipse.
    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.
    orientation
    The orientation of the arc, clockwise or counterclockwise.
    spatialReference
    (Optional) The spatial reference of the arc. The default value is null.
    Exceptions
    ExceptionDescription
    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 Ellipse
    // Construct an ellipse centered at (1, 2) with rotationAngle = -pi/6,  
    // semiMajorAxis = 5, minorMajorRatio = 0.2, oriented clockwise.
    // Use a builderEx convenience method or use a builderEx constructor.
    
    Coordinate2D centerPt = new Coordinate2D(1, 2);
    
    // BuilderEx convenience methods don't need to run on the MCT.
    EllipticArcSegment ellipse = EllipticArcBuilderEx.CreateEllipse(centerPt, -1 * Math.PI / 6, 5, 0.2, ArcOrientation.ArcClockwise);
    
    // This EllipticArcBuilderEx constructor doesn't need to run on the MCT.
    EllipticArcBuilderEx builder = new EllipticArcBuilderEx(centerPt, -1 * Math.PI / 6, 5, 0.2, ArcOrientation.ArcClockwise);
    EllipticArcSegment anotherEllipse = builder.ToSegment();
    
    Create Ellipse Text Element
    //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(
      container, TextType.PolygonParagraph, poly, sym, text, "New Ellipse Text", false);
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also