<?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: Create a Map document (Mxd or Msd) through python script in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/create-a-map-document-mxd-or-msd-through-python/m-p/426190#M33460</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You will need a map file somewhere on disk, but you can save copies of it. What you would do is open an MXD with arcpy.mapping.MapDocument, then a layer file with arcpy.mapping.Layer, use layer.replaceDataSource to make it point to the shapefile, then use arcpy.mapping.AddLayer to add the layer which now points to the shapefile to the map document. You would continue until you've added all your layers and then call saveACopy on the MapDocument object to produce your new MXD with all your data sources.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Mar 2011 16:05:59 GMT</pubDate>
    <dc:creator>JasonScheirer</dc:creator>
    <dc:date>2011-03-10T16:05:59Z</dc:date>
    <item>
      <title>Create a Map document (Mxd or Msd) through python script</title>
      <link>https://community.esri.com/t5/python-questions/create-a-map-document-mxd-or-msd-through-python/m-p/426189#M33459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a folder which contains n number of shapefiles. With every update, the count of shapefile varies.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it feasible, through Geoprocessing script to create a map document by automatically picking all the shape files from the folder?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Nidhi&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Mar 2011 10:26:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-a-map-document-mxd-or-msd-through-python/m-p/426189#M33459</guid>
      <dc:creator>nidhiarora</dc:creator>
      <dc:date>2011-03-10T10:26:28Z</dc:date>
    </item>
    <item>
      <title>Re: Create a Map document (Mxd or Msd) through python script</title>
      <link>https://community.esri.com/t5/python-questions/create-a-map-document-mxd-or-msd-through-python/m-p/426190#M33460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You will need a map file somewhere on disk, but you can save copies of it. What you would do is open an MXD with arcpy.mapping.MapDocument, then a layer file with arcpy.mapping.Layer, use layer.replaceDataSource to make it point to the shapefile, then use arcpy.mapping.AddLayer to add the layer which now points to the shapefile to the map document. You would continue until you've added all your layers and then call saveACopy on the MapDocument object to produce your new MXD with all your data sources.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Mar 2011 16:05:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-a-map-document-mxd-or-msd-through-python/m-p/426190#M33460</guid>
      <dc:creator>JasonScheirer</dc:creator>
      <dc:date>2011-03-10T16:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: Create a Map document (Mxd or Msd) through python script</title>
      <link>https://community.esri.com/t5/python-questions/create-a-map-document-mxd-or-msd-through-python/m-p/426191#M33461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thnx got it working&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Nidhi&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2011 08:38:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-a-map-document-mxd-or-msd-through-python/m-p/426191#M33461</guid>
      <dc:creator>nidhiarora</dc:creator>
      <dc:date>2011-03-11T08:38:16Z</dc:date>
    </item>
  </channel>
</rss>

