<?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 communicate two lists in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-to-communicate-two-lists/m-p/323734#M25218</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, got it.&amp;nbsp; You are caught up in Esri semantics.&amp;nbsp; The &lt;A href="http://desktop.arcgis.com/en/desktop/latest/tools/data-management-toolbox/copy-features.htm"&gt;Copy Features &lt;/A&gt;tool won't work for you because it copies "features from the input feature class or layer to a &lt;SPAN style="text-decoration: underline;"&gt;new&lt;/SPAN&gt; feature class."&amp;nbsp; Check out the &lt;A href="http://desktop.arcgis.com/en/desktop/latest/tools/data-management-toolbox/append.htm"&gt;Append &lt;/A&gt;tool.&amp;nbsp; Although it will work with multiple input datasets, it works just fine with one input dataset.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 25 Apr 2015 15:22:28 GMT</pubDate>
    <dc:creator>JoshuaBixby</dc:creator>
    <dc:date>2015-04-25T15:22:28Z</dc:date>
    <item>
      <title>How to communicate two lists</title>
      <link>https://community.esri.com/t5/python-questions/how-to-communicate-two-lists/m-p/323727#M25211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm having trouble with lists.&lt;/P&gt;&lt;P&gt;I work on two different workspaces&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first is a file geodatabase (a)&lt;/P&gt;&lt;P&gt;The second is an SDE geodatabase (b)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The aim is to remove the contents of feature classes contained in a list (b)&lt;/P&gt;&lt;P&gt;So far so good&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then copy the new records (a) in the entity classes of (b)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To delete the records I use arcpy.DeleteFeatures_management () function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To complete the feature classes with the new content I use the function&lt;/P&gt;&lt;P&gt;arcpy.CopyFeatures_management ()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2015 23:03:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-communicate-two-lists/m-p/323727#M25211</guid>
      <dc:creator>PierreWeisse</dc:creator>
      <dc:date>2015-04-23T23:03:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to communicate two lists</title>
      <link>https://community.esri.com/t5/python-questions/how-to-communicate-two-lists/m-p/323728#M25212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;so...how is it going?&amp;nbsp; Have you done this manually? Are you trying to produce a script from it?&amp;nbsp; Examine the Results Window to see the script syntax if so.&amp;nbsp; It will give you a starting point as to how to put this together.&amp;nbsp; Alternately, construct a model from modelbuilder which can be used itself and/or converted to a script.&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2015 23:22:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-communicate-two-lists/m-p/323728#M25212</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-04-23T23:22:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to communicate two lists</title>
      <link>https://community.esri.com/t5/python-questions/how-to-communicate-two-lists/m-p/323729#M25213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much for the quick reply.&lt;/P&gt;&lt;P&gt;Here is my script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import arcpy, os&lt;/P&gt;&lt;P&gt;from arcpy import env&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;env.workspace ="M:\UTILISATEURS\Pierre\connexion SDE\srv-arcsde.recif.nc@sde_ore_adm.sde\SDE_ORE_ADM.TEST"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lst_destination = arcpy.ListFeatureClasses()&lt;/P&gt;&lt;P&gt;for fc in lst_destination:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.DeleteFeatures_management(fc)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print fc + " is delete"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far, so good. This is the next step that I have a problem.&lt;/P&gt;&lt;P&gt;I can not seem to communicate this list with another list, to come to copy the new entities in the feature classes that have been deleted.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2015 23:43:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-communicate-two-lists/m-p/323729#M25213</guid>
      <dc:creator>PierreWeisse</dc:creator>
      <dc:date>2015-04-23T23:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to communicate two lists</title>
      <link>https://community.esri.com/t5/python-questions/how-to-communicate-two-lists/m-p/323730#M25214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;​same procedure using&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//001200000020000000"&gt; Feature Class to Feature Class&lt;/A&gt; syntax as shown in the help topic.&lt;/P&gt;&lt;P&gt;I would, however, suggest that you copy the features from the source location first, prior to deleting them.&amp;nbsp; If the files are outside of a geodatabase, you can use pure python operating functions...but that is a different story.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2015 23:49:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-communicate-two-lists/m-p/323730#M25214</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-04-23T23:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to communicate two lists</title>
      <link>https://community.esri.com/t5/python-questions/how-to-communicate-two-lists/m-p/323731#M25215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can not use the tool "Feature Class To Feature Class (Conversion)"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's why I use the tool arcpy.DeleteFeatures_management (). I work in an organization with many users who use data during updates.&lt;/P&gt;&lt;P&gt;This tool allows the updates even when users are connected to the base.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Process:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcpy.DeleteFeatures_management ()&lt;/P&gt;&lt;P&gt;To clear the table for these records&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcpy.CopyFeatures_management ()&lt;/P&gt;&lt;P&gt;To fill the table with records last days&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Apr 2015 02:47:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-communicate-two-lists/m-p/323731#M25215</guid>
      <dc:creator>PierreWeisse</dc:creator>
      <dc:date>2015-04-24T02:47:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to communicate two lists</title>
      <link>https://community.esri.com/t5/python-questions/how-to-communicate-two-lists/m-p/323732#M25216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you working with versioned data?&amp;nbsp; The code snippet you provide will delete all of the features in the feature classes, so it appears you are completely purging the table and repopulating it from scratch.&amp;nbsp; If you are working with versioned data, this will make your add &amp;amp; delete tables grow substantially.&amp;nbsp; Do you really need to replace all the records or are you trying to synchronize subsets of records between the two data sources?&amp;nbsp; Deleting all the records in an SDE table when users are consuming data from the table seems like it would lead to some strange experiences for users.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Apr 2015 13:24:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-communicate-two-lists/m-p/323732#M25216</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2015-04-24T13:24:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to communicate two lists</title>
      <link>https://community.esri.com/t5/python-questions/how-to-communicate-two-lists/m-p/323733#M25217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Joshua and Dan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These data are not versioned. These are data from one of our partners. They take care to versioning. Our organization recovers data via their FTP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The data that we update, have a comparable table structure of an update to another. There may be new entities or additional information in the fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use the functions:&lt;/P&gt;&lt;P&gt;arcpy.DeleteFeatures_management ()&lt;/P&gt;&lt;P&gt;To clear the table for these records&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcpy.CopyFeatures_management ()&lt;/P&gt;&lt;P&gt;To fill the table with records last days&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because the data can be used by other users when I wish performed the update. These same users are warned in advance that an update will take place. They are not surprised. A document is even sent them for their explained what those updates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you both&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Apr 2015 05:23:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-communicate-two-lists/m-p/323733#M25217</guid>
      <dc:creator>PierreWeisse</dc:creator>
      <dc:date>2015-04-25T05:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to communicate two lists</title>
      <link>https://community.esri.com/t5/python-questions/how-to-communicate-two-lists/m-p/323734#M25218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, got it.&amp;nbsp; You are caught up in Esri semantics.&amp;nbsp; The &lt;A href="http://desktop.arcgis.com/en/desktop/latest/tools/data-management-toolbox/copy-features.htm"&gt;Copy Features &lt;/A&gt;tool won't work for you because it copies "features from the input feature class or layer to a &lt;SPAN style="text-decoration: underline;"&gt;new&lt;/SPAN&gt; feature class."&amp;nbsp; Check out the &lt;A href="http://desktop.arcgis.com/en/desktop/latest/tools/data-management-toolbox/append.htm"&gt;Append &lt;/A&gt;tool.&amp;nbsp; Although it will work with multiple input datasets, it works just fine with one input dataset.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Apr 2015 15:22:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-communicate-two-lists/m-p/323734#M25218</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2015-04-25T15:22:28Z</dc:date>
    </item>
  </channel>
</rss>

