Applying an event handler to a Rhino command with Python

Hi,
I’am working with RHINO PYTHON and need to activate an event handler whenever the Rhino LINE command is over. (EndComand event).
I suppose that, in order to do it, I have to retrieve the COMMAND LINE OBJECT first. and then initialize the EndCommand event of that object…
If this procedure is correct, how can I retrieve the command line object ?
Is there a good sample for this?
Thanks a lot.

Hi @luciano.micchini,

Take a look at the following sample - wouldn’t take much to add a Command.EndCommand handler

https://github.com/mcneel/rhino-developer-samples/blob/6/rhinopython/SampleEventHandler.py

– Dale

1 Like

Thank you very much, Dale!