<?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>idea Enable Undo for Python based editing tools in ArcGIS Pro Ideas</title>
    <link>https://community.esri.com/t5/arcgis-pro-ideas/enable-undo-for-python-based-editing-tools/idi-p/1386066</link>
    <description>&lt;P&gt;I was recently experimenting with porting some custom editing tools over from .NET to a Python toolbox. At first this was pretty successful and I was pleased with how far I was able to get. However, there is one deal breaker that is preventing us from moving forward with these tools. There is no means in ArcGIS Pro to undo the results of a Python toolbox tool, or a Python script tool.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I propose is adding the "Enable Undo" functionality available for some geoprocessing tools (e.g., Append) to custom script tools and/or or Python toolboxes. I understand that there any many things that could happen in a Python tool that could not be undone, but if changes are made to the geometry or attributes of a layer or table present in the map, within an edit operation in the script, they should be added to the main undo stack.&lt;/P&gt;&lt;P&gt;Note: apparently there used to be a workaround for this functionality but it is no longer available in 3.x&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-pro-questions/how-can-i-enable-quot-undo-edits-quot-for-a-model/td-p/711512" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/arcgis-pro-questions/how-can-i-enable-quot-undo-edits-quot-for-a-model/td-p/711512&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Apr 2024 18:28:33 GMT</pubDate>
    <dc:creator>GJY</dc:creator>
    <dc:date>2024-04-03T18:28:33Z</dc:date>
    <item>
      <title>Enable Undo for Python based editing tools</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/enable-undo-for-python-based-editing-tools/idi-p/1386066</link>
      <description>&lt;P&gt;I was recently experimenting with porting some custom editing tools over from .NET to a Python toolbox. At first this was pretty successful and I was pleased with how far I was able to get. However, there is one deal breaker that is preventing us from moving forward with these tools. There is no means in ArcGIS Pro to undo the results of a Python toolbox tool, or a Python script tool.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I propose is adding the "Enable Undo" functionality available for some geoprocessing tools (e.g., Append) to custom script tools and/or or Python toolboxes. I understand that there any many things that could happen in a Python tool that could not be undone, but if changes are made to the geometry or attributes of a layer or table present in the map, within an edit operation in the script, they should be added to the main undo stack.&lt;/P&gt;&lt;P&gt;Note: apparently there used to be a workaround for this functionality but it is no longer available in 3.x&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-pro-questions/how-can-i-enable-quot-undo-edits-quot-for-a-model/td-p/711512" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/arcgis-pro-questions/how-can-i-enable-quot-undo-edits-quot-for-a-model/td-p/711512&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 18:28:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/enable-undo-for-python-based-editing-tools/idi-p/1386066</guid>
      <dc:creator>GJY</dc:creator>
      <dc:date>2024-04-03T18:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: Enable Undo for Python based editing tools - Status changed to: In Product Plan</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/enable-undo-for-python-based-editing-tools/idc-p/1405376#M29215</link>
      <description />
      <pubDate>Wed, 03 Apr 2024 18:28:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/enable-undo-for-python-based-editing-tools/idc-p/1405376#M29215</guid>
      <dc:creator>DrewFlater</dc:creator>
      <dc:date>2024-04-03T18:28:47Z</dc:date>
    </item>
    <item>
      <title>Re: Enable Undo for Python based editing tools - Status changed to: Implemented</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/enable-undo-for-python-based-editing-tools/idc-p/1557711#M32819</link>
      <description>&lt;P&gt;This is implemented in &lt;STRONG&gt;ArcGIS Pro 3.4&lt;/STRONG&gt;.&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;Custom&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/analysis/geoprocessing/basics/create-a-python-script-tool.htm#ESRI_SECTION1_0E7C909B7BB843B0A2341DD8F42F48F6" target="_self" rel="nofollow noopener noreferrer"&gt;script&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;and&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/analysis/geoprocessing/modelbuilder/model-properties.htm#GUID-9D1E10C0-5196-4068-A6C5-DAEB41E8700C" target="_self" rel="nofollow noopener noreferrer"&gt;model&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;tools have the ability to enable undo, and you can add the enable undo toggle using the new Attributes property, "Show Enable Undo Toggle".&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MargaretCrawford_1-1731437320934.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/119324i35A17006FD6618EA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MargaretCrawford_1-1731437320934.png" alt="MargaretCrawford_1-1731437320934.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;With this attribute set, the &lt;STRONG&gt;Enable Undo&lt;/STRONG&gt; toggle will display at the bottom of the tool dialog.&lt;/P&gt;
&lt;P&gt;Your Python script tool's execution code must use the &lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/data-access/editor.htm" target="_self"&gt;&lt;STRONG&gt;arcpy.da.Editor class&lt;/STRONG&gt;&lt;/A&gt; with the editor workspace set to the geodatabase or workspace containing the dataset being edited. When your code calls the editor &lt;STRONG&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/data-access/editor.htm#M2_GUID-AAE0637D-9CE2-4DAF-A306-BD21F61AF4FB" target="_self"&gt;startEditing function&lt;/A&gt;&lt;/STRONG&gt;&amp;nbsp;make sure the &lt;STRONG&gt;with_undo&lt;/STRONG&gt; argument is set to &lt;STRONG&gt;True&lt;/STRONG&gt; or left blank, otherwise the edit will not be able to be undone after the tool runs.&lt;/P&gt;
&lt;P&gt;Go to &lt;A href="https://community.esri.com/t5/arcgis-ideas-blog/your-ideas-in-arcgis-pro-3-4/bc-p/1556503" target="_blank" rel="noopener"&gt;Your Ideas in ArcGIS Pro 3.4&lt;/A&gt;&amp;nbsp;to see other ideas implemented this release and check out the &lt;A href="https://pro.arcgis.com/en/pro-app/latest/get-started/whats-new-in-arcgis-pro.htm#ESRI_SECTION1_463DCA76A448429C8EE22ED94F1E70B0" target="_self"&gt;What's New&lt;/A&gt;&amp;nbsp;help to learn about everything that is new and improved in ArcGIS Pro 3.4.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2024 20:04:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/enable-undo-for-python-based-editing-tools/idc-p/1557711#M32819</guid>
      <dc:creator>MargaretCrawford</dc:creator>
      <dc:date>2024-11-12T20:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: Enable Undo for Python based editing tools</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/enable-undo-for-python-based-editing-tools/idc-p/1567294#M33150</link>
      <description>&lt;P&gt;If you would like to see an example of the new &lt;STRONG&gt;Enable Undo&lt;/STRONG&gt; toggle for script and model tools, and other new features for custom tools added in recent releases, please check out our new blog:&amp;nbsp;&lt;STRONG&gt;&lt;A href="https://www.esri.com/arcgis-blog/products/arcgis-pro/analytics/build-custom-tools-in-arcgispro/" target="_blank" rel="noopener"&gt;Build Better Custom Geoprocessing tools (now with Enable Undo) in ArcGIS Pro!&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2024 15:24:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/enable-undo-for-python-based-editing-tools/idc-p/1567294#M33150</guid>
      <dc:creator>MargaretCrawford</dc:creator>
      <dc:date>2024-12-11T15:24:11Z</dc:date>
    </item>
  </channel>
</rss>

