ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Core.Geometry Namespace / EllipticArcBuilderEx Class / EllipticArcBuilderEx Constructor / EllipticArcBuilderEx Constructor(MapPoint,Double,Double,Double,ArcOrientation,MinorOrMajor,SpatialReference)
The point from which the arc starts.
The length of the chord connecting start point to the end point of the arc. If negative, then the absolute value is used. Cannot be equal to zero.
The angle in radians of the chord connecting the start point to the end point of the arc.
The radius of the embedded circle.
The orientation of the arc, clockwise or counterclockwise.
Indicates whether the arc is a minor or major arc. A minor arc is an arc such that the central angle is less than PI radians.
(Optional) The spatial reference of the arc. The default value is null. The spatial reference of the start point is ignored.
Example

In This Topic
    EllipticArcBuilderEx Constructor(MapPoint,Double,Double,Double,ArcOrientation,MinorOrMajor,SpatialReference)
    In This Topic
    Creates a new instance of the EllipticArcBuilderEx class. The new instance will be a circular arc.
    Syntax

    Parameters

    startPt
    The point from which the arc starts.
    chordLength
    The length of the chord connecting start point to the end point of the arc. If negative, then the absolute value is used. Cannot be equal to zero.
    chordBearing
    The angle in radians of the chord connecting the start point to the end point of the arc.
    radius
    The radius of the embedded circle.
    orientation
    The orientation of the arc, clockwise or counterclockwise.
    minorOrMajor
    Indicates whether the arc is a minor or major arc. A minor arc is an arc such that the central angle is less than PI radians.
    spatialReference
    (Optional) The spatial reference of the arc. The default value is null. The spatial reference of the start point is ignored.
    Exceptions
    ExceptionDescription
    startPt is null or empty.
    chordLength, chordBearing or radius is NaN.
    chordLength equals zero or is greater than 2 * radius.
    Example
    Construct a Circular Arc - using a chord length and bearing
    {
      // Construct a circular arc counterclockwise from (2, 1) to (1, 2) such that the embedded 
      // circle has center point at (1, 1) and radius = 1.
      // Use a builderEx convenience method or use a builderEx constructor.
    
      MapPoint fromPtArc = MapPointBuilderEx.CreateMapPoint(2, 1, SpatialReferences.WGS84);
      double chordLength = Math.Sqrt(2);
      double chordBearing = 3 * Math.PI / 4;
      double radius = 1;
      ArcOrientation orientation = ArcOrientation.ArcCounterClockwise;
      MinorOrMajor minorOrMajor = MinorOrMajor.Minor;
    
      // BuildeEx convenience methods don't need to run on the MCT.
      EllipticArcSegment circularArcBuilder = EllipticArcBuilderEx.CreateCircularArc(fromPtArc, chordLength, chordBearing, radius, orientation, minorOrMajor);
    
      // BuilderEx constructors don't need to run on the MCT either.
      EllipticArcBuilderEx ellipticArcBuilderEx = new EllipticArcBuilderEx(fromPtArc, chordLength, chordBearing, radius, orientation, minorOrMajor);
      // do something with the builder
    
      EllipticArcSegment anotherCircularArc = 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