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

0 Members and 1 Guest are viewing this topic.

gswang

  • Newt
  • Posts: 117
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: 348
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);