<?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: help exporting map layers in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/help-exporting-map-layers/m-p/118017#M9269</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sort of... The list layers command returns a Python list of map layers; you can iterate over them and export them as you wish.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;mxd = arcpy.mapping.MapDocument("Current")
outPath = 'C:\\Temp\\' # for example...
lyrList = arcpy.mapping.ListLayers(mxd)
for lyr in lyrList: # iterate over the layers
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.FeatureClassToShapefile_conversion(lyr,outPath)
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There might be a better tool than &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;&lt;STRONG&gt;FeatureClassToShapefile_conversion&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt; - it doesn't seem to let you choose the name out the output file - but this should get you on the right track...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 06:55:22 GMT</pubDate>
    <dc:creator>StacyRendall1</dc:creator>
    <dc:date>2021-12-11T06:55:22Z</dc:date>
    <item>
      <title>help exporting map layers</title>
      <link>https://community.esri.com/t5/python-questions/help-exporting-map-layers/m-p/118016#M9268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to create a python script that will export all the files that are located in the .mxd table of contents.&amp;nbsp; What I am trying to do is export everything into a folder similar to the map package tool but I do not want to change the layers to actual .lyr files, but keep them as .shp files.&amp;nbsp; There are also some raster files used in the maps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I was trying to use the arcpy.Copymanagement but am stuck with how to enter the input.&amp;nbsp; I was trying to use&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;mxd = arcpy.mapping.MapDocument("Current")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;lyr = arcpy.mapping.ListLayers(mxd)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Am I on the right track with this??&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2011 21:15:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/help-exporting-map-layers/m-p/118016#M9268</guid>
      <dc:creator>SteveWalsh</dc:creator>
      <dc:date>2011-07-28T21:15:57Z</dc:date>
    </item>
    <item>
      <title>Re: help exporting map layers</title>
      <link>https://community.esri.com/t5/python-questions/help-exporting-map-layers/m-p/118017#M9269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sort of... The list layers command returns a Python list of map layers; you can iterate over them and export them as you wish.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;mxd = arcpy.mapping.MapDocument("Current")
outPath = 'C:\\Temp\\' # for example...
lyrList = arcpy.mapping.ListLayers(mxd)
for lyr in lyrList: # iterate over the layers
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.FeatureClassToShapefile_conversion(lyr,outPath)
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There might be a better tool than &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;&lt;STRONG&gt;FeatureClassToShapefile_conversion&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt; - it doesn't seem to let you choose the name out the output file - but this should get you on the right track...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:55:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/help-exporting-map-layers/m-p/118017#M9269</guid>
      <dc:creator>StacyRendall1</dc:creator>
      <dc:date>2021-12-11T06:55:22Z</dc:date>
    </item>
  </channel>
</rss>

