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?


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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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