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

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

Parameters

elementContainer
Layout or GroupElement
polyline
Polyline
text
String

Return Value

Returns a GraphicElement.
Exceptions
ExceptionDescription
This method or property must be called within the lambda passed to QueuedTask.Run.
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, Windows 7

See Also

Reference

LayoutElementFactory Class
LayoutElementFactory Members
Overload List