ArcGIS Pro 2.7 API Reference Guide
CreateCurvedTextGraphicElement(ILayoutElementContainer,Polyline,String,CIMTextSymbol) Method
Example 

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

Parameters

elementContainer
Layout or GroupElement
polyline
Polyline
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 curve text with basic text properties.

//Construct on the worker thread
await QueuedTask.Run(() =>
{
  //Build geometry
  Coordinate2D pt1 = new Coordinate2D(3.6, 7.5);
  Coordinate2D pt2 = new Coordinate2D(4.26, 8);
  Coordinate2D pt3 = new Coordinate2D(4.93, 7.1);
  Coordinate2D pt4 = new Coordinate2D(5.6, 7.5);
  CubicBezierBuilder bez = new CubicBezierBuilder(pt1, pt2, pt3, pt4);
  CubicBezierSegment bezSeg = bez.ToSegment();
  Polyline bezPl = PolylineBuilder.CreatePolyline(bezSeg);

  //Set symbolology, create and add element to layout
  CIMTextSymbol sym = SymbolFactory.Instance.ConstructTextSymbol(ColorFactory.Instance.BlackRGB, 24, "Comic Sans MS", "Regular");
  GraphicElement bezTxtElm = LayoutElementFactory.Instance.CreateCurvedTextGraphicElement(layout, bezPl, "Curved Text", sym);
  bezTxtElm.SetName("New Splinned Text");
});
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

LayoutElementFactory Class
LayoutElementFactory Members
Overload List