EllipticArcBuilderEx Constructor(MapPoint,MapPoint,Double,Double,Double,MinorOrMajor,ArcOrientation,SpatialReference)
Creates a new instance of the EllipticArcBuilderEx class. The new instance will be an elliptic arc.
Parameters
- startPt
- The start point of the elliptic arc.
- endPt
- The end point of the elliptic arc.
- 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.
- rotationAngle
- The angle in radians by which the ellipse is rotated from the X-axis. A positive value corresponds to counterclockwise rotation.
- minorOrMajor
- The enumeration value indicating 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.
- orientation
- The value indicating if the arc is oriented clockwise or counterclockwise.
- spatialReference
- (Optional) The spatial reference. The default value is null. The spatial references of the start and end points are ignored.
Create Circle Text Element
//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 symbolology, 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(
container, TextType.CircleParagraph, poly, sym, text, "New Circle Text", false);
Create Predefined Shape Graphic Element
//Must be on QueuedTask.Run(() => { ...
//PredefinedShape shapeType =
// PredefinedShape.Circle | Cloud | Cross |Circle | Triangle | ... ;
//Build geometry
Coordinate2D ll = new Coordinate2D(4, 2.5);
Coordinate2D ur = new Coordinate2D(6, 4.5);
Envelope env = EnvelopeBuilderEx.CreateEnvelope(ll, ur);
var outline = SymbolFactory.Instance.ConstructStroke(
ColorFactory.Instance.BlueRGB, 2);
var poly_sym = SymbolFactory.Instance.ConstructPolygonSymbol(
null, outline);
var ge = ElementFactory.Instance.CreatePredefinedShapeGraphicElement(
container, shapeType, env.Center, env.Width, env.Height,
poly_sym, shapeType.ToString(), true);
Target Platforms: Windows 11, Windows 10
ArcGIS Pro version: 3.0 or higher.