TheSwamp

Code Red => .NET => Topic started by: gswang on August 24, 2021, 02:07:25 AM

Title: How to get the coordinates 127840.3210 、295371.1740 ?
Post by: gswang on August 24, 2021, 02:07:25 AM
How to get the  coordinates 127840.3210 、295371.1740 ?

Thanks a lot!
Title: Re: How to get the coordinates 127840.3210 、295371.1740 ?
Post by: n.yuan on August 24, 2021, 09:21:09 AM
Since you post in .NET API, I assume you know at least how to open an Entity in a transaction with the entity's ObjectId. In your case, it is a Polyline being selected:

var polyline=(Polyline)tran.GetObject(polylineId, OpenMode.ForRead);

// the coordinate of the first vertex point,
var firstPt=polyline.GetPoint2dAt(0);