Get the coordinates of the selected line

Discuss and ask questions about CAD .NET library.

Moderators: SDS, support, admin

Post Reply
Masoud
Posts: 13
Joined: 25 May 2022, 18:57

Get the coordinates of the selected line

Post by Masoud » 06 Aug 2022, 09:32

Hello
How can I get the coordinates of the line drawn and selected by the mouse?

support
Posts: 3254
Joined: 30 Mar 2005, 11:36
Contact:

Re: Get the coordinates of the selected line

Post by support » 08 Aug 2022, 14:46

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
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Post Reply