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 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?

Thanks

share|improve this question
add comment

1 Answer 1

up vote 2 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
add comment

Your Answer

 
discard

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.