RhinoCommon and old RMA.Rhino.MRhinoEventWatcher

Hi,

I’m looking for some classes or objects in RhinoCommon to work like old MRhinoEventWatcher class, but I can´t…

I need the old watcher functionalities to control my Plugins events, OnCloseDocument, OnReplaceObject, OnDeleteObject, etc…

Thank in advance.

You will find events for objects and document as static events on RhinoDoc:

http://4.rhino3d.com/5/rhinocommon/html/Events_T_Rhino_RhinoDoc.htm

For example:

RhinoDoc.CloseDocument += OnCloseDocument;
void OnCloseDocument(object sender, DocumentEventArgs args)
{
  // handle the document closing event here
}

Ok, I’m going to test this solution.

Thanks.