Initializing event watchers in V6 with RhinoCommon


#1

I’ve compiled and run the C# EventWatchers sample plug-in. In that sample it looks like you use a command to enable/disable the event handling for RhinoApp and RhinoDoc events. I am trying to set up the event handling during plug-in initialization and am running into some difficulty. If I move the SampleCsEventHandlers.Instance.Enable(true) call to the plug-in OnLoad override, the event handlers do not get called. I also tried moving the call after overriding CreateCommands to no avail. Is there a time after the plug-in has loaded (but prior to returning control to the user) that I can subscribe to app/doc events and have the event handlers called.

Thanks, Larry


(Dale Fugier) #2

Hi Larry,

I am not able to repeat this. I’ve modified the sample event watcher project to enable event handling when the plug-in loads.

https://github.com/dalefugier/SampleCsEventWatcher

Does this work for you?

– Dale