AnsweredAssumed Answered

Cannot 'Undo' after edits made

Question asked by bulla_b on Nov 24, 2017
Latest reply on Dec 8, 2017 by bulla_b

I have some code where I edit fields using a Chained EditOperation, but they do no show up in the Undo stack.  Here is the main logic behind what I am doing:

 

var editOperation = new ArcGIS.Desktop.Editing.EditOperation();
editOperation.Name = "Create new Facility IDs";

 

< start the looping>

var featureEdit = new ArcGIS.Desktop.Editing.EditOperation();
featureEdit = editOperation.CreateChainedOperation();

 

<code to make edits>

 

featureEdit.Modify(insp);
featureEdit.Execute();

<end the loop>  //continue until all selected features are edited

 

editOperation.Modify(insp);  //Without this line, nothing shows in the Undo stack....but even with it, nothing                                                            actually gets Undone after I press Undo

editOperation.Execute();

 

 

I want the user to be able to Undo ALL of the edits, not just one at a time.

 

Any ideas as to where I am going wrong??

 

Thanks,

Outcomes