<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic IEditor.StartOperation issue in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/ieditor-startoperation-issue/m-p/454300#M12342</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey folks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I posted &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/96790-Python-Addins-with-comtypes-ArcObjects-and-Undo-Redo" rel="nofollow noopener noreferrer" target="_blank"&gt;this issue&lt;/A&gt;&lt;SPAN&gt; to the Python forum, but am posting again here because I'm more likely to get an answer from ArcObjects developers.&amp;nbsp; Can anyone explain why I can't successfully start an editing session in the following scenario?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using Python wrappers to access ArcObjects from within Python AddIn tools developed to edit SDE feature classes.&amp;nbsp; Under normal circumstances, edits made with Python AddIns aren't undo/redoable because the tools can't communicate with a preexisting (ongoing) editing session.&amp;nbsp; My ultimate goal is to give the user undo/redo functionality for edits made with these tools.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
edit = getIEditorUsingComtypes()&amp;nbsp;&amp;nbsp; #(this function returns IEditor successfully)
edit.StartOperation&amp;nbsp; 
�?� #(python code creating a feature using a Python Insert Cursor)
edit.StopOperation
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any suggestions?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 20:15:41 GMT</pubDate>
    <dc:creator>KerryAlley</dc:creator>
    <dc:date>2021-12-11T20:15:41Z</dc:date>
    <item>
      <title>IEditor.StartOperation issue</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/ieditor-startoperation-issue/m-p/454300#M12342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey folks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I posted &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/96790-Python-Addins-with-comtypes-ArcObjects-and-Undo-Redo" rel="nofollow noopener noreferrer" target="_blank"&gt;this issue&lt;/A&gt;&lt;SPAN&gt; to the Python forum, but am posting again here because I'm more likely to get an answer from ArcObjects developers.&amp;nbsp; Can anyone explain why I can't successfully start an editing session in the following scenario?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using Python wrappers to access ArcObjects from within Python AddIn tools developed to edit SDE feature classes.&amp;nbsp; Under normal circumstances, edits made with Python AddIns aren't undo/redoable because the tools can't communicate with a preexisting (ongoing) editing session.&amp;nbsp; My ultimate goal is to give the user undo/redo functionality for edits made with these tools.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
edit = getIEditorUsingComtypes()&amp;nbsp;&amp;nbsp; #(this function returns IEditor successfully)
edit.StartOperation&amp;nbsp; 
�?� #(python code creating a feature using a Python Insert Cursor)
edit.StopOperation
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any suggestions?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:15:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/ieditor-startoperation-issue/m-p/454300#M12342</guid>
      <dc:creator>KerryAlley</dc:creator>
      <dc:date>2021-12-11T20:15:41Z</dc:date>
    </item>
  </channel>
</rss>

