Page 1 of 1

Best way to know when a user has drawn a line

Posted: 21 Jul 2014, 20:48
by odenlou
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?

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

Posted: 23 Jul 2014, 16:57
by support
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