ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Core.Geometry Namespace / EllipticArcBuilderEx Class / EllipticArcBuilderEx Constructor / EllipticArcBuilderEx Constructor(MapPoint,MapPoint,Coordinate2D,ArcOrientation,SpatialReference)
The point from which the arc starts.
The point to which the arc ends.
The center point of the embedded circle.
The orientation of the arc, clockwise or counterclockwise.
(Optional) The spatial reference of the arc. The default value is null. The spatial references of the start and end points are ignored.
Example

In This Topic
    EllipticArcBuilderEx Constructor(MapPoint,MapPoint,Coordinate2D,ArcOrientation,SpatialReference)
    In This Topic
    Creates a new instance of the EllipticArcBuilderEx class. The new instance will be a circular arc from end points and the center point.
    Syntax

    Parameters

    startPt
    The point from which the arc starts.
    endPt
    The point to which the arc ends.
    centerPt
    The center point of the embedded circle.
    orientation
    The orientation of the arc, clockwise or counterclockwise.
    spatialReference
    (Optional) The spatial reference of the arc. The default value is null. The spatial references of the start and end points are ignored.
    Exceptions
    ExceptionDescription
    startPt or endPt is null or empty.
    centerPt is empty.
    Remarks
    The xy-tolerance from the spatial reference is used to create the elliptic arc. If the spatial reference is null, then a default tolerance is used which may cause unexpected results.
    Example
    Construct a Circular Arc - using a center point and orientation
    {
      // Construct a circular arc from (2, 1) to (1, 2) 
      // with center point at (1, 1) and orientation counterclockwise.
      // Use a builderEx convenience method or use a builderEx constructor.
    
      MapPoint toPt = MapPointBuilderEx.CreateMapPoint(1, 2);
      MapPoint fromPt = MapPointBuilderEx.CreateMapPoint(2, 1);
      Coordinate2D centerPtCoord = new Coordinate2D(1, 1);
    
      // BuilderEx convenience methods don't need to run on the MCT.
      ellipticArcSegment = EllipticArcBuilderEx.CreateCircularArc(fromPt, toPt, centerPtCoord, ArcOrientation.ArcCounterClockwise);
    
      // BuilderEx constructors need to run on the MCT.
      EllipticArcBuilderEx ellipticArcBuilder = new EllipticArcBuilderEx(fromPt, toPt, centerPtCoord, ArcOrientation.ArcCounterClockwise);
      EllipticArcSegment arcSegment = ellipticArcBuilder.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