//Must be on 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);
var bez = new CubicBezierBuilderEx(pt1, pt2, pt3, pt4);
var bezSeg = bez.ToSegment();
Polyline bezPl = PolylineBuilderEx.CreatePolyline(bezSeg, AttributeFlags.AllAttributes);
//Set symbology, create and add element to layout
CIMLineSymbol lineSym = SymbolFactory.Instance.ConstructLineSymbol(
ColorFactory.Instance.RedRGB, 4.0, SimpleLineStyle.DashDot);
ElementFactory.Instance.CreateGraphicElement(container, bezPl, lineSym, "New Bezier");