simon6

Stumped on ediOnChangeFeature Event - different results with different edit tasks...

Discussion created by simon6 on May 3, 2010
Latest reply on May 4, 2010 by kirkktx
I'm working in 92 and I am stumped again on

private void m_editEvents_OnChangeFeature(IObject obj)...

Issue 1:
Let me explain. I have a geometric network containing fire hydrants, laterals, etc. The fire hydrants have feature linked anno. I created a DLL containing an editevents_onChangeFeature and onCreateFeature event.
During debug mode, when a FH is moved my code stops at a break point where I can see the object fed into the change event is the FH. So all is good here and I know my event_change feature works. During this change event I autopopulate some fields, and then it iterates through change event again.
question1: Why does my code iterate through change event again? And why does it do that more than once for no apparant reason? I thought it was refiring the change event because the object or feature kept changing (first spatially then attributes). Does it keep reiterating through the change event until no changes are detected? For some fire hydrants I tested, I am debugging my code 4 times for one and the same FH I only moved once...
Anyway, after that it does laterals which makes sense because they are connected to the fire hydrants but sometimes too it refires 4 times but I don't change any fields in the lateral layer. Once makes sense to me because the geometry changed.

Issue 2:
When the active edit task is 'create new feature' and I move a FH with the edit tool, this FH is processed >1 by the change event, so is the lateral, and then it stops. It never processes the feature linked anno.
When the active edit task is 'modify feature' and I move a FH, first the lateral is processed n times, then the FH n times, and anno1 FC, anno2 FC, anno3 FC, and anno 4 FC are all processed n times. So then it works great, except n times seems a bit much.

Why are the anno FC processed during a modify feature task and not when the feature task is set to create new feature? Could dirty data play a role?
Thx!

Outcomes