EndCommand Event

EndCommand Event

ChuotSieuNhan
Contributor Contributor
424 Views
2 Replies
Message 1 of 3

EndCommand Event

ChuotSieuNhan
Contributor
Contributor

Hi guys, how to create event after command finished. The following example ends the LINE drawing command calling another action. Other commands like Polyline, Rectangle are not affected

0 Likes
Accepted solutions (1)
425 Views
2 Replies
Replies (2)
Message 2 of 3

_gile
Consultant
Consultant
Accepted solution

Hi,

Typically, we check the command name.

        private static void Doc_CommandEnded(object sender, CommandEventArgs e)
        {
            if (e.GlobalCommandName == "LINE")
            {
                // do your stuff 
            }
        }

 



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

0 Likes
Message 3 of 3

ChuotSieuNhan
Contributor
Contributor

Thank @_gile  🎉

0 Likes