vbmart

IExtension example in C#  - event listener?

Discussion created by vbmart on May 11, 2010
Latest reply on May 12, 2010 by vbmart
Can anyone point me to a good example of IExtension in C#?  I have written a simple event listener, but I don't seem to be hooking it up quite right.  I want the listener to be on whenever ArcMap is on, so no interaction from the user is required to start the tool I will be writing - well, no action other than making a feature selection with the select tool.  I am listening for the "OnSelectionChanged()" event.

I have found plenty of examples of an event listener class, so I am fairly confident in that part of my code.  The difficulty seems to be in hooking it to the application. 

Also, probably a more basic question - is this the right approach to inherit from IExtension for an event listener, or should I be inheriting from BaseTool and going at it from that direction (or something else entirely)?

Thanks very much for any input on this!

Outcomes