Page 1 of 1

Get the coordinates of the selected line

Posted: 06 Aug 2022, 09:32
by Masoud
Hello
How can I get the coordinates of the line drawn and selected by the mouse?

Re: Get the coordinates of the selected line

Posted: 08 Aug 2022, 14:46
by support
Masoud wrote:
06 Aug 2022, 09:32
Hello
How can I get the coordinates of the line drawn and selected by the mouse?
Hello,
CADLine has Point1 and Point2 properties, that indicate the coordinates of the line:

Code: Select all

private void menuItemLine_Click(object sender, EventArgs e)
  {
   if (cadImage == null) return;
   CADLine targetLine = cadImage.SelectedEntities[0] as CADLine;
   DPoint startLine = targetLine.Point;
   DPoint endLine = targetLine.Point1;
  }
  
Best wishes,
Catherine