AnsweredAssumed Answered

Prevent OnChangeFeature event from firing within itself?

Question asked by emblaisdell on Apr 22, 2014
Latest reply on Apr 23, 2014 by sean_jones-esristaff
Hello,

I have an OnChangeFeature event wired to fire whenever a feature is changed (obviously).  Within the event, I am updating a field value, which then fires the event again.  Hence, infinite loop.  How can I prevent this from happening?

I have tried to remove the event within itself by using:

editEvents.OnChangeFeature -= new IEditEvents_OnChangeFeatureEventHandler(OnChangeFeature);


...which works, but only if I don't add the event back (with a +=) afterward, which I need to do.  If I add the event back, even after the field update, the event fires again.

Thanks,
Evan.

Outcomes