<?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 ArcMap arcpy Add-In Editing Using da.UpdateCursor with Undo/Redo Stack in Python Snippets Questions</title>
    <link>https://community.esri.com/t5/python-snippets-questions/arcmap-arcpy-add-in-editing-using-da-updatecursor/m-p/825019#M368</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to build a series of arcpy Add-In buttons for ArcMap 10.6 that&amp;nbsp;perform simple field calculations via da.updateCursor on selected annotation features in an ArcMap edit session. I have all the edit code working, however after an edit occurs, the standard Undo/Redo stack is not enabled and I need these edits to participate in the Undo/Redo stack. These are standard Feature Class annotation edits on the table itself, so they should behave like any other feature class edit on a data row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd prefer to have to avoid building these in C# with ArcObjects. &lt;STRONG&gt;Is there a way to&amp;nbsp;access the standard editing undo/redo stack (for File Geodatabase environments) during an ArcMap editing session using an arcpy Add-In natively without&lt;/STRONG&gt;&amp;nbsp;(1) accessing ArcObjects via comtypes/snippets, or (2) building it directly with ArcObjects? Also, (3) is it necessary to use arcpy with an &lt;A href="http://desktop.arcgis.com/en/arcmap/latest/analyze/python-addins/extension-class.htm"&gt;Application Extension&lt;/A&gt; and accessing the &lt;A href="http://desktop.arcgis.com/en/arcmap/latest/analyze/python-addins/extension-class.htm"&gt;onChangeFeature(self)&lt;/A&gt;&amp;nbsp;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that I do not want to create a separate Undo/Redo stack for these edits, independent of the other edits in the ArcMap session, as suggested &lt;A _jive_internal="true" href="https://community.esri.com/thread/54016"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any advice would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Apr 2019 16:38:36 GMT</pubDate>
    <dc:creator>JoeSimons2</dc:creator>
    <dc:date>2019-04-23T16:38:36Z</dc:date>
    <item>
      <title>ArcMap arcpy Add-In Editing Using da.UpdateCursor with Undo/Redo Stack</title>
      <link>https://community.esri.com/t5/python-snippets-questions/arcmap-arcpy-add-in-editing-using-da-updatecursor/m-p/825019#M368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to build a series of arcpy Add-In buttons for ArcMap 10.6 that&amp;nbsp;perform simple field calculations via da.updateCursor on selected annotation features in an ArcMap edit session. I have all the edit code working, however after an edit occurs, the standard Undo/Redo stack is not enabled and I need these edits to participate in the Undo/Redo stack. These are standard Feature Class annotation edits on the table itself, so they should behave like any other feature class edit on a data row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd prefer to have to avoid building these in C# with ArcObjects. &lt;STRONG&gt;Is there a way to&amp;nbsp;access the standard editing undo/redo stack (for File Geodatabase environments) during an ArcMap editing session using an arcpy Add-In natively without&lt;/STRONG&gt;&amp;nbsp;(1) accessing ArcObjects via comtypes/snippets, or (2) building it directly with ArcObjects? Also, (3) is it necessary to use arcpy with an &lt;A href="http://desktop.arcgis.com/en/arcmap/latest/analyze/python-addins/extension-class.htm"&gt;Application Extension&lt;/A&gt; and accessing the &lt;A href="http://desktop.arcgis.com/en/arcmap/latest/analyze/python-addins/extension-class.htm"&gt;onChangeFeature(self)&lt;/A&gt;&amp;nbsp;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that I do not want to create a separate Undo/Redo stack for these edits, independent of the other edits in the ArcMap session, as suggested &lt;A _jive_internal="true" href="https://community.esri.com/thread/54016"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any advice would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Apr 2019 16:38:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-snippets-questions/arcmap-arcpy-add-in-editing-using-da-updatecursor/m-p/825019#M368</guid>
      <dc:creator>JoeSimons2</dc:creator>
      <dc:date>2019-04-23T16:38:36Z</dc:date>
    </item>
  </channel>
</rss>

