//Must be on QueuedTask.Run(() => { ...
//Build geometry
List<Coordinate2D> plCoords = new List<Coordinate2D>();
plCoords.Add(new Coordinate2D(1, 8.5));
plCoords.Add(new Coordinate2D(1.66, 9));
plCoords.Add(new Coordinate2D(2.33, 8.1));
plCoords.Add(new Coordinate2D(3, 8.5));
Polyline linePl = PolylineBuilderEx.CreatePolyline(plCoords);
var arrowInfo = new ArrowInfo()
{
ArrowHeadKey = ArrowInfo.DefaultArrowHeadKeys[8],
ArrowOnBothEnds = true,
ArrowSizePoints = 24,
LineWidthPoints = 12
};
//Create and add element to layout
GraphicElement lineElm = ElementFactory.Instance.CreateArrowGraphicElement(
container, linePl, arrowInfo, "Arrow Line", true,
new ElementInfo() { Rotation = 15.0 });
//lineElm.SetName("New Line");