mapswae

Problem with IEditor

Discussion created by mapswae on Nov 30, 2011
Hi,

I have a problem when I use my own edit tool together with existing ArcMap tasks. My program lets the user select some existing objects and creates new features.
When I start an Editor session and run my tool only then everything works fine. After 'Save Edits' the result is saved as expected. When I use my tool first and do some other editing next (like deleting or moving some points) the result is also correct.
The problem occurs when I use my tool after some ArcMap commands. The modifications done by ArcMap are not written to the feature tables. Instead I get DELTA_... tables in my PersonalGDB.
Only the features that my program created are saved, so I suppose that something in my code prevents the 'Save Edits' for all the ArcMap edits.

I use the following code to get an editor object and start/stop editing:

UID uidEdit = new UIDClass();
uidEdit.Value = "esriEditor.Editor";
m_editor = m_application.FindExtensionByCLSID(uidEdit) as IEditor;

try
{
m_editor.StartOperation();
//do the edit task
m_editor.StopOperation("MyTool");
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Problem", MessageBoxButtons.OK, MessageBoxIcon.Error);
m_editor.AbortOperation();
}


Thomas Waenke

Outcomes