<?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 Copying from a list of feature layers using python in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/copying-from-a-list-of-feature-layers-using-python/m-p/183499#M14095</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to copy feature layers using the following code, but get no results. Can anyone help me understand why my code does not work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import os&lt;/P&gt;&lt;P&gt;import arcpy &lt;/P&gt;&lt;P&gt;arcpy.env.workspace = ws = 'C:\\WorkSpace\\sahie_saipe\\sahie_saipe.gdb'&lt;/P&gt;&lt;P&gt;dictionary_Layer = {'co06_Layer':'co06', 'co07_Layer':'co07', 'cnty08_Layer':'co08', 'co09_Layer':'co09', 'co10_Layer':'co10', 'co11_Layer':'co11', 'co12_Layer':'co12', 'st_Select':'state'}&lt;/P&gt;&lt;P&gt;for layer in arcpy.mapping.ListLayers(mxd):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if layer in dictionary_Layer:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; old = os.path.join(ws, layer)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new = os.path.join(ws, dictionary_Layer[layer])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CopyFeatures_management(old,new,"")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print 'copy %s to %s' %(layer, dictionary_Layer[layer])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; except:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print 'Could not copy %s' &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Jul 2014 17:22:46 GMT</pubDate>
    <dc:creator>MehrshadNourani</dc:creator>
    <dc:date>2014-07-24T17:22:46Z</dc:date>
    <item>
      <title>Copying from a list of feature layers using python</title>
      <link>https://community.esri.com/t5/python-questions/copying-from-a-list-of-feature-layers-using-python/m-p/183499#M14095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to copy feature layers using the following code, but get no results. Can anyone help me understand why my code does not work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import os&lt;/P&gt;&lt;P&gt;import arcpy &lt;/P&gt;&lt;P&gt;arcpy.env.workspace = ws = 'C:\\WorkSpace\\sahie_saipe\\sahie_saipe.gdb'&lt;/P&gt;&lt;P&gt;dictionary_Layer = {'co06_Layer':'co06', 'co07_Layer':'co07', 'cnty08_Layer':'co08', 'co09_Layer':'co09', 'co10_Layer':'co10', 'co11_Layer':'co11', 'co12_Layer':'co12', 'st_Select':'state'}&lt;/P&gt;&lt;P&gt;for layer in arcpy.mapping.ListLayers(mxd):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if layer in dictionary_Layer:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; old = os.path.join(ws, layer)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new = os.path.join(ws, dictionary_Layer[layer])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CopyFeatures_management(old,new,"")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print 'copy %s to %s' %(layer, dictionary_Layer[layer])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; except:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print 'Could not copy %s' &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2014 17:22:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copying-from-a-list-of-feature-layers-using-python/m-p/183499#M14095</guid>
      <dc:creator>MehrshadNourani</dc:creator>
      <dc:date>2014-07-24T17:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: Copying from a list of feature layers using python</title>
      <link>https://community.esri.com/t5/python-questions/copying-from-a-list-of-feature-layers-using-python/m-p/183500#M14096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;The variable "layer" represents the layer object, not the name of the layer (a string).&amp;nbsp; You therefore need to look for layer.name in the dictionary, and more specifically look in the list of the dictionary keys.&amp;nbsp; I've copied your code and edited lines 6-12 below for clarification... hopefully I didn't introduce typos!&lt;/P&gt;&lt;P&gt;Kerry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14062245344803091 jive_text_macro" jivemacro_uid="_14062245344803091" modifiedtitle="true"&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;import os&lt;/P&gt;
&lt;P&gt;import arcpy &lt;/P&gt;
&lt;P&gt;arcpy.env.workspace = ws = 'C:\\WorkSpace\\sahie_saipe\\sahie_saipe.gdb'&lt;/P&gt;
&lt;P&gt;dictionary_Layer = {'co06_Layer':'co06', 'co07_Layer':'co07', 'cnty08_Layer':'co08', 'co09_Layer':'co09', 'co10_Layer':'co10', 'co11_Layer':'co11', 'co12_Layer':'co12', 'st_Select':'state'}&lt;/P&gt;
&lt;P&gt;for layer in arcpy.mapping.ListLayers(mxd):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if layer.name in dictionary_Layer.keys():&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; old = os.path.join(ws, layer.name)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new = os.path.join(ws, dictionary_Layer[layer.name])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CopyFeatures_management(old,new,"")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print 'copy %s to %s' %(layer.name, dictionary_Layer[layer.name])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; except:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print 'Could not copy %s'(layer.name)&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print 'Could not copy %s'&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2014 18:07:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copying-from-a-list-of-feature-layers-using-python/m-p/183500#M14096</guid>
      <dc:creator>KerryAlley</dc:creator>
      <dc:date>2014-07-24T18:07:46Z</dc:date>
    </item>
    <item>
      <title>Re: Copying from a list of feature layers using python</title>
      <link>https://community.esri.com/t5/python-questions/copying-from-a-list-of-feature-layers-using-python/m-p/183501#M14097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mehrshad,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First off, you never define what your mxd variable is.&amp;nbsp; To use the arcpy.mapping.ListLayers, you need to make a map document object which you can call the ListLayers on.&amp;nbsp;&amp;nbsp;&amp;nbsp; Use &lt;SPAN class="n"&gt;mxd&lt;/SPAN&gt; &lt;SPAN class="o"&gt;=&lt;/SPAN&gt; &lt;SPAN class="n"&gt;arcpy&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;mapping&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;MapDocument&lt;/SPAN&gt;&lt;SPAN class="p"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s"&gt;r"Filepathtoyourmapdocumenthere"&lt;/SPAN&gt;&lt;SPAN class="p"&gt;) to create your MapDocument object first.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="p"&gt;Secondly, you are copying feature layers and making feature classes it seems, which is fine, but you shouldn't need the old = os.path.join(ws, layer), since feature layers are stored in memory and not on the hard drive.&amp;nbsp; If you are referencing existing feature classes, then its fine as is.&amp;nbsp; If not though I would take out the old = , and put&amp;nbsp; in this CopyFeatures_management(layer.name, new) for your copy features statement.&amp;nbsp; Also you would need to use that layer.name for checking agaisnt your dictionary.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="p"&gt;Hope this helps you out. &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2014 18:16:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copying-from-a-list-of-feature-layers-using-python/m-p/183501#M14097</guid>
      <dc:creator>IanMurray</dc:creator>
      <dc:date>2014-07-24T18:16:38Z</dc:date>
    </item>
    <item>
      <title>Re: Copying from a list of feature layers using python</title>
      <link>https://community.esri.com/t5/python-questions/copying-from-a-list-of-feature-layers-using-python/m-p/183502#M14098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kerry, Ian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for&amp;nbsp; your help. I incorporated your suggestions (below) but no results!&lt;/P&gt;&lt;P&gt;@&lt;/P&gt;&lt;P&gt;import os&amp;nbsp; &lt;/P&gt;&lt;P&gt;import arcpy&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;arcpy.env.workspace = ws = 'C:\\WorkSpace\\sahie_saipe\\sahie_saipe.gdb'&amp;nbsp; &lt;/P&gt;&lt;P&gt;dictionary_Layer = {'co06_Layer':'co06', 'co07_Layer':'co07', 'cnty08_Layer':'co08', 'co09_Layer':'co09', 'co10_Layer':'co10', 'co11_Layer':'co11', 'co12_Layer':'co12', 'st_Select':'state'} &lt;/P&gt;&lt;P&gt;mxd = arcpy.mapping.MapDocument('C:\\WorkSpace\\sahie_saipe\\sahie_saipe.mxd') &lt;/P&gt;&lt;P&gt;for layer in arcpy.mapping.ListLayers(mxd):&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if layer.name in dictionary_Layer.keys():&amp;nbsp; &lt;/P&gt;&lt;P&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; old = os.path.join(ws, layer.name)&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new = os.path.join(ws, dictionary_Layer[layer.name])&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try:&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CopyFeatures_management(layer.name, new,"")&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print 'copy %s to %s' %(layer.name, dictionary_Layer[layer.name])&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; except:&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print 'Could not copy %s'(layer.name)&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print 'Could not copy %s' &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2014 19:02:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copying-from-a-list-of-feature-layers-using-python/m-p/183502#M14098</guid>
      <dc:creator>MehrshadNourani</dc:creator>
      <dc:date>2014-07-24T19:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: Copying from a list of feature layers using python</title>
      <link>https://community.esri.com/t5/python-questions/copying-from-a-list-of-feature-layers-using-python/m-p/183503#M14099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since Ian brought it up, I'll add that you don't need specify the full path for the output feature class either, as long as you want it to be saved in the already-specified workspace.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As with most geoprocessing tools, CopyFeatures_management honors selections and definition queries, so make sure you know what you're copying.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the code below doesn't work, try commenting out the try and except lines (and de-indenting the arcpy.CopyFeatures_management and print lines) to see what error occurs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, I found typos in my previous post.&amp;nbsp; There should only be one line (that looks like this) in the except block:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print 'Could not copy %s'%layer.name &lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14062352735832519" jivemacro_uid="_14062352735832519"&gt;
&lt;P&gt;import os&amp;nbsp; &lt;/P&gt;
&lt;P&gt;import arcpy&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;arcpy.env.workspace = ws = 'C:\\WorkSpace\\sahie_saipe\\sahie_saipe.gdb'&amp;nbsp; &lt;/P&gt;
&lt;P&gt;dictionary_Layer = {'co06_Layer':'co06', 'co07_Layer':'co07', 'cnty08_Layer':'co08', 'co09_Layer':'co09', 'co10_Layer':'co10', 'co11_Layer':'co11', 'co12_Layer':'co12', 'st_Select':'state'} &lt;/P&gt;
&lt;P&gt;mxd = arcpy.mapping.MapDocument('C:\\WorkSpace\\sahie_saipe\\sahie_saipe.mxd') &lt;/P&gt;
&lt;P&gt;for layer in arcpy.mapping.ListLayers(mxd):&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if layer.name in dictionary_Layer.keys():&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try:&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CopyFeatures_management(layer.name, dictionary_Layer[layer.name]) #only 2 required parameters, full path not necessary to output to workspace &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print 'copy %s to %s' %(layer.name, dictionary_Layer[layer.name])&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; except:&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print 'Could not copy %s'%layer.name &lt;/P&gt;

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2014 21:24:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copying-from-a-list-of-feature-layers-using-python/m-p/183503#M14099</guid>
      <dc:creator>KerryAlley</dc:creator>
      <dc:date>2014-07-24T21:24:00Z</dc:date>
    </item>
    <item>
      <title>Re: Copying from a list of feature layers using python</title>
      <link>https://community.esri.com/t5/python-questions/copying-from-a-list-of-feature-layers-using-python/m-p/183504#M14100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kerry,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you verey much for your help.&amp;nbsp; I'll try your suggestions and see if the code would work. &lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2014 10:42:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copying-from-a-list-of-feature-layers-using-python/m-p/183504#M14100</guid>
      <dc:creator>MehrshadNourani</dc:creator>
      <dc:date>2014-07-25T10:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: Copying from a list of feature layers using python</title>
      <link>https://community.esri.com/t5/python-questions/copying-from-a-list-of-feature-layers-using-python/m-p/183505#M14101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not anywhere I can test, but think it might be related to this line:&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14063124345092679" jivemacro_uid="_14063124345092679"&gt;
&lt;P&gt;if layer.name in dictionary_Layer.keys(): &lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the past, to check if a value is in a dictionary, I used syntax similar to this to get the results:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14063125432385738 jive_text_macro" jivemacro_uid="_14063125432385738"&gt;
&lt;P&gt;if (dictionary_Layer.has_key(layer.name)):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do stuff&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2014 18:22:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copying-from-a-list-of-feature-layers-using-python/m-p/183505#M14101</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2014-07-25T18:22:28Z</dc:date>
    </item>
    <item>
      <title>Re: Copying from a list of feature layers using python</title>
      <link>https://community.esri.com/t5/python-questions/copying-from-a-list-of-feature-layers-using-python/m-p/183506#M14102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Our methods of searching for keys have the same functionality, and they're both described &lt;A href="https://docs.python.org/release/2.7/library/stdtypes.html#mapping-types-dict"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2014 19:12:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copying-from-a-list-of-feature-layers-using-python/m-p/183506#M14102</guid>
      <dc:creator>KerryAlley</dc:creator>
      <dc:date>2014-07-25T19:12:52Z</dc:date>
    </item>
    <item>
      <title>Re: Copying from a list of feature layers using python</title>
      <link>https://community.esri.com/t5/python-questions/copying-from-a-list-of-feature-layers-using-python/m-p/183507#M14103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;actually..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_1406512512951469" jivemacro_uid="_1406512512951469"&gt;&lt;SPAN class="keyword"&gt;if layer.name &lt;SPAN class="keyword"&gt;in&lt;/SPAN&gt; dictionary_Layer:&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN class="keyword"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="keyword"&gt;... is enough, since it automatically checks for the keys...&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jul 2014 01:57:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copying-from-a-list-of-feature-layers-using-python/m-p/183507#M14103</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2014-07-28T01:57:34Z</dc:date>
    </item>
  </channel>
</rss>

