Best way to know when a user has drawn a line

Discuss and ask questions about CAD .NET library.

Moderators: SDS, support, admin

Post Reply
odenlou
Posts: 11
Joined: 16 Jul 2014, 23:57

Best way to know when a user has drawn a line

Post by odenlou » 21 Jul 2014, 20:48

I need to programmatically detect when a user has just finished drawing a line so that I can record that line's start and end points. Of course MouseUp is a possibility, but I see that Undo/Redo is recording this action, so I wondered if the entire line drawing action is already being captured so that the action as whole can be retrieved. In other words is there a built in feature that makes it easy to know when a line was drawn and whats its end points are?

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

Re: Best way to know when a user has drawn a line

Post by support » 23 Jul 2014, 16:57

Hello,

There is a DrawEvent in CADEntity class that occurs when an entity is drawn and CADEntity.OnDraw() method. Undo/Redo commands are based on CADImage.Undo() and CADImage.Redo() methods.

Mikhail
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Post Reply