ArcGIS Pro 2.9 API Reference Guide
CreateEllipseParagraphGraphicElement(ILayoutElementContainer,EllipticArcSegment,String,CIMTextSymbol) Method
Example 

ArcGIS.Desktop.Layouts Namespace > LayoutElementFactory Class > CreateEllipseParagraphGraphicElement Method : CreateEllipseParagraphGraphicElement(ILayoutElementContainer,EllipticArcSegment,String,CIMTextSymbol) Method
Layout or GroupElement
EllipticArcSegment
String
CIMTextSymbol
Creates a graphic ellipse text element on a layout from an elliptical arc segment geometry with an added parameter to set text symbol. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
Public Overloads Function CreateEllipseParagraphGraphicElement( _
   ByVal elementContainer As ILayoutElementContainer, _
   ByVal ellipse As EllipticArcSegment, _
   Optional ByVal text As String, _
   Optional ByVal textSymbol As CIMTextSymbol _
) As GraphicElement

Parameters

elementContainer
Layout or GroupElement
ellipse
EllipticArcSegment
text
String
textSymbol
CIMTextSymbol

Return Value

Returns a GraphicElement.
Exceptions
ExceptionDescription
This method or property must be called within the lambda passed to QueuedTask.Run.
Map has reached maximum graphics count limit of 4000 elements. One or more elements cannot be created.
Map has reached maximum graphics size limit of 10 MB. One or more elements cannot be created.
Remarks
If the element container is a Layout then the element gets added to the root level of the layout TOC at the top most position. If the element container is a GroupElement then it gets added to the group at the topmost position.
Example
//Create ellipse paragraph text with basic text settings and optionally a modified border.

//Construct on the worker thread
await QueuedTask.Run(() =>
{
  //Build geometry
  Coordinate2D center = new Coordinate2D(4.5, 2.75);
  EllipticArcBuilder eabElp = new EllipticArcBuilder(center, 0, 1, 0.45, esriArcOrientation.esriArcClockwise);
  EllipticArcSegment ellipse = eabElp.ToSegment();

  //Set symbolology, create and add element to layout
  CIMTextSymbol sym = SymbolFactory.Instance.ConstructTextSymbol(ColorFactory.Instance.BlueRGB, 10, "Arial", "Regular");
  string text = "Ellipse, ellipse, ellipse, ellipse, ellipse, ellipse, ellipse, ellipse, ellipse, ellipse, ellipse, ellipse";
  GraphicElement elpTxtElm = LayoutElementFactory.Instance.CreateEllipseParagraphGraphicElement(layout, ellipse, text, sym);
  elpTxtElm.SetName("New Ellipse Text");

  //(Optionally) Modify paragraph border 
  CIMGraphic elpTxtGra = elpTxtElm.GetGraphic();
  CIMParagraphTextGraphic cimElpTxtGra = elpTxtGra as CIMParagraphTextGraphic;
  cimElpTxtGra.Frame.BorderSymbol = new CIMSymbolReference();
  cimElpTxtGra.Frame.BorderSymbol.Symbol = SymbolFactory.Instance.ConstructLineSymbol(ColorFactory.Instance.GreyRGB, 1.0, SimpleLineStyle.Solid);
  elpTxtElm.SetGraphic(elpTxtGra);
});
Requirements

Target Platforms: Windows 11, Windows 10, Windows 8.1

See Also

Reference

LayoutElementFactory Class
LayoutElementFactory Members
Overload List