IEditor.StartOperation issue

Discussion created by kalley on Nov 19, 2013
Hey folks,

I posted this issue to the Python forum, but am posting again here because I'm more likely to get an answer from ArcObjects developers.  Can anyone explain why I can't successfully start an editing session in the following scenario?

I'm using Python wrappers to access ArcObjects from within Python AddIn tools developed to edit SDE feature classes.  Under normal circumstances, edits made with Python AddIns aren't undo/redoable because the tools can't communicate with a preexisting (ongoing) editing session.  My ultimate goal is to give the user undo/redo functionality for edits made with these tools.

This is a rough outline of the editing steps in the Addin, but I can provide the actual code and more detailed explanation if necessary:
edit = getIEditorUsingComtypes()   #(this function returns IEditor successfully)
�?� #(python code creating a feature using a Python Insert Cursor)

Regardless of whether I attempt to start editing via IEditor or IWorkspaceEdit2, the attempts are not successful (determined by noting that IWorkspaceEdit2.InEditOperation returns "False"). I would really like to know why "IEditor.StartOperation" doesn't seem to work, and what I need to do differently. I'm pretty sure I correctly referenced IEditor, because IEditor.EditState returns "esriStateEditing", and the correct value is returned from IEditor.EditWorkspace.

Any suggestions?