<?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 OverWriteOutput not actually overwriting in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/overwriteoutput-not-actually-overwriting/m-p/565556#M44271</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So I am running a Simplify Line tool in the Python Window and my geoprocessing environment setting in ArcMap is set to overwrite outputs True.&amp;nbsp; I am able to overwrite outputs and do it a lot when cranking out data.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am re-running the Simplify Line and want to overwrite an existing feature class in a file geodatabase.&amp;nbsp; The python windows runs &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.SimplifyLine_cartography(r"Landbase Layer\Infrastructure\Roads selection",r"C:\ESRI WORK FOLDER\Landbase\4- California\Siskiyou Landbase\Landbase Geodatabase\Siskiyou_Landbase.gdb\Infrastructure\LocalRoads_Simplified_50ft","POINT_REMOVE",50,"RESOLVE_ERRORS","KEEP_COLLAPSED_POINTS","CHECK")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Pretty straightforward.&amp;nbsp; When I add the results to the mapdocument, the changes I made are not contained in the attribute table as if it were never overwritten.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Next I delete the feature classes from the database and rerun the same script.&amp;nbsp; My results then do show the change.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Where does the problem exist?&amp;nbsp; and how can I remedy this?&amp;nbsp; If I were to run a larger script and had this issue happen, it would be a really drag.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Richard&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Nov 2013 18:42:54 GMT</pubDate>
    <dc:creator>RichardHughes3</dc:creator>
    <dc:date>2013-11-21T18:42:54Z</dc:date>
    <item>
      <title>OverWriteOutput not actually overwriting</title>
      <link>https://community.esri.com/t5/python-questions/overwriteoutput-not-actually-overwriting/m-p/565556#M44271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So I am running a Simplify Line tool in the Python Window and my geoprocessing environment setting in ArcMap is set to overwrite outputs True.&amp;nbsp; I am able to overwrite outputs and do it a lot when cranking out data.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am re-running the Simplify Line and want to overwrite an existing feature class in a file geodatabase.&amp;nbsp; The python windows runs &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.SimplifyLine_cartography(r"Landbase Layer\Infrastructure\Roads selection",r"C:\ESRI WORK FOLDER\Landbase\4- California\Siskiyou Landbase\Landbase Geodatabase\Siskiyou_Landbase.gdb\Infrastructure\LocalRoads_Simplified_50ft","POINT_REMOVE",50,"RESOLVE_ERRORS","KEEP_COLLAPSED_POINTS","CHECK")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Pretty straightforward.&amp;nbsp; When I add the results to the mapdocument, the changes I made are not contained in the attribute table as if it were never overwritten.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Next I delete the feature classes from the database and rerun the same script.&amp;nbsp; My results then do show the change.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Where does the problem exist?&amp;nbsp; and how can I remedy this?&amp;nbsp; If I were to run a larger script and had this issue happen, it would be a really drag.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Richard&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Nov 2013 18:42:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/overwriteoutput-not-actually-overwriting/m-p/565556#M44271</guid>
      <dc:creator>RichardHughes3</dc:creator>
      <dc:date>2013-11-21T18:42:54Z</dc:date>
    </item>
    <item>
      <title>Re: OverWriteOutput not actually overwriting</title>
      <link>https://community.esri.com/t5/python-questions/overwriteoutput-not-actually-overwriting/m-p/565557#M44272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;One is best advised to deliberatly delete an existing feature class rather than expecting the Overwrite environment setting to ensure that it is removed prior to an attempted write. The environment setting basically just alows overwriting, it does not force it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A three line subroutine:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
def whaka(mole):
&amp;nbsp;&amp;nbsp;&amp;nbsp; if arcpy.Exists(mole):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Delete_management(mole)&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;saves a whole lot of heartache.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:22:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/overwriteoutput-not-actually-overwriting/m-p/565557#M44272</guid>
      <dc:creator>markdenil</dc:creator>
      <dc:date>2021-12-12T00:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: OverWriteOutput not actually overwriting</title>
      <link>https://community.esri.com/t5/python-questions/overwriteoutput-not-actually-overwriting/m-p/565558#M44273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;One caveat to the DeleteManagement method would be if the feature class is being used as a datasource for ArcGIS Server which would put locks on the feature class.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If that is the case I would use a DeleteRows and Append to accomplish the same goal.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Nov 2013 13:54:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/overwriteoutput-not-actually-overwriting/m-p/565558#M44273</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2013-11-25T13:54:15Z</dc:date>
    </item>
  </channel>
</rss>

