Author Topic: How to get the coordinates 127840.3210 、295371.1740 ?  (Read 184 times)

0 Members and 1 Guest are viewing this topic.

gswang

  • Newt
  • Posts: 115
How to get the coordinates 127840.3210 、295371.1740 ?
« on: August 24, 2021, 02:07:25 AM »
How to get the  coordinates 127840.3210 、295371.1740 ?

Thanks a lot!

n.yuan

  • Bull Frog
  • Posts: 313
Re: How to get the coordinates 127840.3210 、295371.1740 ?
« Reply #1 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);