How to draw PointEntity2d object

I am trying to create a PointEntity2d object so that I can draw a point through Bentley SDK in OpenRoadsDesigner. I see CreateFromElement static method, but which element should I create first to call this method? For e.g., will this work? Or is there a better way to do this? I can't find anything in the SDK examples.

var connection = ConsensusConnectionEdit.GetActive();
var ptt = new BeGeoNET.DPoint3d(pt.X * uerToMeter, pt.Y * uerToMeter, pt.Z * uerToMeter);

var line = new LineElement(currentModel, null, new BeGeoNET.DSegment3d(ptt, ptt));  // create a line with same point for start and end
Element elem = line;

BeGeoNET.DPoint3d[] points = { ptt };

PointEntity2d d2d = PointEntity2d.CreateFromElement(connection, elem);

Parents Reply Children