ArcGIS Pro 2.7 API Reference Guide
CreateBezierCurveGraphicElement Method (LayoutElementFactory)
Example 

ArcGIS.Desktop.Layouts Namespace > LayoutElementFactory Class : CreateBezierCurveGraphicElement Method
Layout or GroupElement
Polyline
CIMLineSymbol
Creates a graphic bezier curve element on a layout from a single polyline geometry. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
Public Function CreateBezierCurveGraphicElement( _
   ByVal elementContainer As ILayoutElementContainer, _
   ByVal polyline As Polyline, _
   Optional ByVal lineSymbol As CIMLineSymbol _
) As GraphicElement

Parameters

elementContainer
Layout or GroupElement
polyline
Polyline
lineSymbol
CIMLineSymbol

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 a beizier curve element with a simple line style.

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

  //Set symbology, create and add element to layout
  CIMLineSymbol lineSym = SymbolFactory.Instance.ConstructLineSymbol(ColorFactory.Instance.RedRGB, 4.0, SimpleLineStyle.DashDot);
  GraphicElement bezElm = LayoutElementFactory.Instance.CreateLineGraphicElement(layout, bezPl, lineSym);
  bezElm.SetName("New Bezier Curve");
});
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

LayoutElementFactory Class
LayoutElementFactory Members