Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an ArcMap extension and I'm listening to the IEditEvents.

When the OnChangeFeature, OnCreateFeature or OnDeleteFeature event is called, I want to know if it came from the "merge(Editor_Merge)" button.

Is there a way I can listen to the onClick event of the merge button?

share|improve this question
up vote 3 down vote accepted

Try implementing ICustomizationFilter. When OnCustomizationEvent is called, check to see if it is esriCEInvokeCommand. If it is, then you should be able to cast the object passed as an ICommandItem. Check to see if the ICommmandItem references the Editor_Merge command (using ICommandItem.ID). If it does, set a flag in your extension so that your eventhandler for edit events can know how to react.

share|improve this answer
Works great! thanks for the help! I was already using a customization filter, but I didn't realize that I could catch click events! – Goldorak84 Apr 7 '11 at 14:45

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.