Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am trying to have an ArcMap addin receive ISelectionEvents, but I can't figure out how to register the event handler. I'm using ArcObjects 10.0 for Java. I'm able to catch IDocumentEvents as follows:

public void init(IApplication app) throws java.io.IOException, com.esri.arcgis.interop.AutomationException{
    this.app = app;
    MxDoc doc = (MxDocument) this.app.getDocument();
    doc.addIDocumentEventsListener(new EventCatcher()); // EventCatcher implements IDocumentsEvents and ISelectionEvents

Any suggestions on where to look would be greatly appreciated.

share|improve this question
Just to be sure, you're attempting to create the listener from the Map object, not the Document object, correct? See help.arcgis.com/en/sdk/10.0/java_ao_adf/api/arcobjects/com/esri/… –  blah238 Mar 16 '12 at 5:21
That is correct. –  John Percival Hackworth Mar 17 '12 at 18:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.