<?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 Re: Copy FeatureClass in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/copy-featureclass/m-p/443793#M34779</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It works on ArcGIS 10.1 when I use this Line of Code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;arcpy.env.overwriteOutput = True&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But when I want to run the same Script on an ArcGIS 10.2.1, the same ERROR shows up!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;How is that possible? It's the same code?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Even the Place where I copy to, is the same ArcSDE in my local Network!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 May 2014 12:44:52 GMT</pubDate>
    <dc:creator>MickeyO_Neil</dc:creator>
    <dc:date>2014-05-12T12:44:52Z</dc:date>
    <item>
      <title>Copy FeatureClass</title>
      <link>https://community.esri.com/t5/python-questions/copy-featureclass/m-p/443789#M34775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i want to copy a FeatureClass which is in a Feature-Dataset into an other Feature-Class (which is also in a Feature-Dataset).Both Feature-Classes are on different SDEs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;arcpy.Copy_management(fromgdbpath + "\\" + fd + "\\" + fc,&amp;nbsp; togdbpath + "\\" + toschema + "." + outfd+ "\\" + toschema + "." + outfc, "FeatureClass")&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I always get the following error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;('ERROR 000258: Output C:\\...&amp;lt;Path&amp;gt;... already exists\nFailed to execute (Copy).\n',)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Of course the Output-FC already exists, but why is this a Problem? If I use the Copy-Geoprocessintool in ArcCatalog with the same Parameters everything works fine!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;And if i copy Feature-Classes into other Feature-Classes which are not in a Feature-Dataset, it works, too.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your help!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers Mickey&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Apr 2014 11:49:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copy-featureclass/m-p/443789#M34775</guid>
      <dc:creator>MickeyO_Neil</dc:creator>
      <dc:date>2014-04-30T11:49:30Z</dc:date>
    </item>
    <item>
      <title>Re: Copy FeatureClass</title>
      <link>https://community.esri.com/t5/python-questions/copy-featureclass/m-p/443790#M34776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You don't want Copy, you want Append or Merge. Copy makes a new feature class, and you already have the destination feature class. If you want to replace the destination, delete the destination first and use copy, or delete features and append.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Apr 2014 12:17:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copy-featureclass/m-p/443790#M34776</guid>
      <dc:creator>Zeke</dc:creator>
      <dc:date>2014-04-30T12:17:32Z</dc:date>
    </item>
    <item>
      <title>Re: Copy FeatureClass</title>
      <link>https://community.esri.com/t5/python-questions/copy-featureclass/m-p/443791#M34777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;But the Copy-Tool also copys the Indexes and my target FC is empty, so copy would be just fine.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Apr 2014 12:25:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copy-featureclass/m-p/443791#M34777</guid>
      <dc:creator>MickeyO_Neil</dc:creator>
      <dc:date>2014-04-30T12:25:50Z</dc:date>
    </item>
    <item>
      <title>Re: Copy FeatureClass</title>
      <link>https://community.esri.com/t5/python-questions/copy-featureclass/m-p/443792#M34778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Do the feature classes have the same name? Do they have different spatial references? Either will cause the tool to fail.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Apr 2014 13:11:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copy-featureclass/m-p/443792#M34778</guid>
      <dc:creator>Zeke</dc:creator>
      <dc:date>2014-04-30T13:11:40Z</dc:date>
    </item>
    <item>
      <title>Re: Copy FeatureClass</title>
      <link>https://community.esri.com/t5/python-questions/copy-featureclass/m-p/443793#M34779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It works on ArcGIS 10.1 when I use this Line of Code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;arcpy.env.overwriteOutput = True&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But when I want to run the same Script on an ArcGIS 10.2.1, the same ERROR shows up!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;How is that possible? It's the same code?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Even the Place where I copy to, is the same ArcSDE in my local Network!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 May 2014 12:44:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copy-featureclass/m-p/443793#M34779</guid>
      <dc:creator>MickeyO_Neil</dc:creator>
      <dc:date>2014-05-12T12:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: Copy FeatureClass</title>
      <link>https://community.esri.com/t5/python-questions/copy-featureclass/m-p/443794#M34780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is this an error that just appeared when you upgraded from v10.1 to v10.2?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 May 2014 13:00:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copy-featureclass/m-p/443794#M34780</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2014-05-12T13:00:40Z</dc:date>
    </item>
    <item>
      <title>Re: Copy FeatureClass</title>
      <link>https://community.esri.com/t5/python-questions/copy-featureclass/m-p/443795#M34781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;No, these are two different machines. No upgrad was made.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My final solution:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I split my script in two parts: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If I'm allowed to delete a FeatureClass I use:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;if arcpy.Exists(__toFCpath):
&amp;nbsp;&amp;nbsp; arcpy.Delete_management(__toFCpath)
arcpy.Copy_management(__fromFCpath, __toFCpath)&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;And if i'm not allowed to delete a FeatureClass I use:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;arcpy.DeleteRows_management(...)
arcpy.Append_management(...)&lt;/PRE&gt;&lt;SPAN&gt; and &lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;arcpy.AddIndex_management(...)&lt;/PRE&gt;&lt;SPAN&gt; to copy the Indexes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But be aware of Bug NIM084818 if you are using ArcGIS 10.2.0 or lower:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The Append geoprocessing tool fails to append field values for fields with field names that have 29 or more characters.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mickey&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:51:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copy-featureclass/m-p/443795#M34781</guid>
      <dc:creator>MickeyO_Neil</dc:creator>
      <dc:date>2021-12-11T19:51:02Z</dc:date>
    </item>
  </channel>
</rss>

