<?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: How to preserve OBJECTID while exporting feature class to another EGDB using Feature class to feature class in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-to-preserve-objectid-while-exporting-feature/m-p/1247521#M67839</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/483343"&gt;@DavidAnderson_1701&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;It can preserve the OBJECTID if we use the copy function like&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/406743"&gt;@TonyContreras_Frisco_TX&lt;/a&gt;&amp;nbsp;mentioned above.&lt;BR /&gt;And no other ArcPy function can preserve the object if there's any non sequential numbers in it (Like by luck)&lt;/P&gt;</description>
    <pubDate>Thu, 12 Jan 2023 01:26:40 GMT</pubDate>
    <dc:creator>shamnasPC</dc:creator>
    <dc:date>2023-01-12T01:26:40Z</dc:date>
    <item>
      <title>How to preserve OBJECTID while exporting feature class to another EGDB using Feature class to feature class</title>
      <link>https://community.esri.com/t5/python-questions/how-to-preserve-objectid-while-exporting-feature/m-p/1247207#M67835</link>
      <description>&lt;P&gt;Is there any way to preserve OBJECTID while exporting feature class to another EGDB using Feature class to feature class ?&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2023 13:25:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-preserve-objectid-while-exporting-feature/m-p/1247207#M67835</guid>
      <dc:creator>shamnasPC</dc:creator>
      <dc:date>2023-01-11T13:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to preserve OBJECTID while exporting feature class to another EGDB using Feature class to feature class</title>
      <link>https://community.esri.com/t5/python-questions/how-to-preserve-objectid-while-exporting-feature/m-p/1247247#M67836</link>
      <description>&lt;P&gt;I have found that using the copy function in ArcGIS Desktop keeps the OBJECTID values of the source feature class. Feature Class to Feature Class does not reliably, in my experience. I am not sure if these statements are true in ArcGIS Pro. I still wouldn't count on OBJECTID column being preserved when moving a feature class from one source to another and would recommend abandoning any workflows that rely on the OBJECTID values.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2023 14:41:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-preserve-objectid-while-exporting-feature/m-p/1247247#M67836</guid>
      <dc:creator>TonyContreras_Frisco_TX</dc:creator>
      <dc:date>2023-01-11T14:41:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to preserve OBJECTID while exporting feature class to another EGDB using Feature class to feature class</title>
      <link>https://community.esri.com/t5/python-questions/how-to-preserve-objectid-while-exporting-feature/m-p/1247265#M67837</link>
      <description>&lt;P&gt;As OBJECTID is a system created primary key, none of the tools are going to keep it other than by luck.&amp;nbsp; &amp;nbsp;If you want to retain the value, create a new column in the feature class with same data type as OBJECTID, maybe with a name like old_objectid.&amp;nbsp; The use the field calculator to set the old_objectid = OBJECTID.&amp;nbsp; Then export.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2023 15:05:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-preserve-objectid-while-exporting-feature/m-p/1247265#M67837</guid>
      <dc:creator>DavidAnderson_1701</dc:creator>
      <dc:date>2023-01-11T15:05:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to preserve OBJECTID while exporting feature class to another EGDB using Feature class to feature class</title>
      <link>https://community.esri.com/t5/python-questions/how-to-preserve-objectid-while-exporting-feature/m-p/1247521#M67839</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/483343"&gt;@DavidAnderson_1701&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;It can preserve the OBJECTID if we use the copy function like&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/406743"&gt;@TonyContreras_Frisco_TX&lt;/a&gt;&amp;nbsp;mentioned above.&lt;BR /&gt;And no other ArcPy function can preserve the object if there's any non sequential numbers in it (Like by luck)&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2023 01:26:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-preserve-objectid-while-exporting-feature/m-p/1247521#M67839</guid>
      <dc:creator>shamnasPC</dc:creator>
      <dc:date>2023-01-12T01:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to preserve OBJECTID while exporting feature class to another EGDB using Feature class to feature class</title>
      <link>https://community.esri.com/t5/python-questions/how-to-preserve-objectid-while-exporting-feature/m-p/1247522#M67840</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.esri.com/t5/user/viewprofilepage/user-id/406743" target="_blank"&gt;@TonyContreras_Frisco_TX&lt;/A&gt;&amp;nbsp;, Yes the copy function works in both Desktop and ArcGIS Pro and It can retain the OBJECTID.&lt;/P&gt;&lt;P&gt;Hence I wrote the below python to achieve it.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;import&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;arcpy, os&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;connection_file =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;r&lt;/SPAN&gt;&lt;SPAN&gt;"\input URL Path"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;local_fgdb =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;r&lt;/SPAN&gt;&lt;SPAN&gt;'\outputgdb Patha'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;fullname = os.path.join(connection_file,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"inputFeatureClassName"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;feats=arcpy.FeatureSet(table=fullname)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;feats.save(os.path.join(local_fgdb,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"inputFeatureClassName"&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 12 Jan 2023 01:27:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-preserve-objectid-while-exporting-feature/m-p/1247522#M67840</guid>
      <dc:creator>shamnasPC</dc:creator>
      <dc:date>2023-01-12T01:27:22Z</dc:date>
    </item>
  </channel>
</rss>

