<?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: copy all data from an mxd in Mapping Questions</title>
    <link>https://community.esri.com/t5/mapping-questions/copy-all-data-from-an-mxd/m-p/728327#M7867</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This is a perfect application of the arcpy.mapping scripting environment.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You could loop through a folder of mxds and simply execute the following code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mxd=arcpy.mapping.MapDocument(path to mxd)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mxd.description = "whatever"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;there are some great sample tools/scripts available to help you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Go to the resource center and do a search on&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.mapping sample script tools&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Mar 2011 15:12:58 GMT</pubDate>
    <dc:creator>JeffBarrette</dc:creator>
    <dc:date>2011-03-08T15:12:58Z</dc:date>
    <item>
      <title>copy all data from an mxd</title>
      <link>https://community.esri.com/t5/mapping-questions/copy-all-data-from-an-mxd/m-p/728321#M7861</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;BR /&gt;&lt;SPAN&gt;I've got a complex MXD that is linked to various data throughout our network.&amp;nbsp; I'd like to write a python script that'll step through each layer in the MXD and copy it's data source to an output directory so I can burn all this data to a DVD for sharing.&amp;nbsp; Does anyone have some example arcpy code that they're willing to share?&amp;nbsp; Any advice will also be greatly appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Greg&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Sep 2010 14:09:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/copy-all-data-from-an-mxd/m-p/728321#M7861</guid>
      <dc:creator>GregFiske</dc:creator>
      <dc:date>2010-09-27T14:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: copy all data from an mxd</title>
      <link>https://community.esri.com/t5/mapping-questions/copy-all-data-from-an-mxd/m-p/728322#M7862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Are you using 10? If so, you can do this without writing code - just create a map package. You can share the map package - its a portable file containing a MXD and all the data.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Sep 2010 21:06:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/copy-all-data-from-an-mxd/m-p/728322#M7862</guid>
      <dc:creator>JeffMoulds</dc:creator>
      <dc:date>2010-09-27T21:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: copy all data from an mxd</title>
      <link>https://community.esri.com/t5/mapping-questions/copy-all-data-from-an-mxd/m-p/728323#M7863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Jeff.&amp;nbsp; Map Packages are awesome.&amp;nbsp; However, the recipient of my data uses ArcGIS version 9.3&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Sep 2010 12:27:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/copy-all-data-from-an-mxd/m-p/728323#M7863</guid>
      <dc:creator>GregFiske</dc:creator>
      <dc:date>2010-09-28T12:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: copy all data from an mxd</title>
      <link>https://community.esri.com/t5/mapping-questions/copy-all-data-from-an-mxd/m-p/728324#M7864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Are you at 10 though? You can take the MXD that is embedded in the MPK and save it to 9.3. You can also copy all the data from the geodatabases in the MPK to 9.3 geodatabases. The 9.3 MXD will still be portable because it has relative paths to the data.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Sep 2010 18:06:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/copy-all-data-from-an-mxd/m-p/728324#M7864</guid>
      <dc:creator>JeffMoulds</dc:creator>
      <dc:date>2010-09-29T18:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: copy all data from an mxd</title>
      <link>https://community.esri.com/t5/mapping-questions/copy-all-data-from-an-mxd/m-p/728325#M7865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Jeff - I am using 10 and this is a great solution.&amp;nbsp; You the man.&amp;nbsp; Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Sep 2010 18:32:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/copy-all-data-from-an-mxd/m-p/728325#M7865</guid>
      <dc:creator>GregFiske</dc:creator>
      <dc:date>2010-09-29T18:32:47Z</dc:date>
    </item>
    <item>
      <title>Re: copy all data from an mxd</title>
      <link>https://community.esri.com/t5/mapping-questions/copy-all-data-from-an-mxd/m-p/728326#M7866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;How would you do this in ArcGIS 9.x? I read above that a code may do this?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Sep 2010 18:49:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/copy-all-data-from-an-mxd/m-p/728326#M7866</guid>
      <dc:creator>DonovanCameron</dc:creator>
      <dc:date>2010-09-29T18:49:42Z</dc:date>
    </item>
    <item>
      <title>Re: copy all data from an mxd</title>
      <link>https://community.esri.com/t5/mapping-questions/copy-all-data-from-an-mxd/m-p/728327#M7867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This is a perfect application of the arcpy.mapping scripting environment.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You could loop through a folder of mxds and simply execute the following code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mxd=arcpy.mapping.MapDocument(path to mxd)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mxd.description = "whatever"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;there are some great sample tools/scripts available to help you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Go to the resource center and do a search on&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.mapping sample script tools&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Mar 2011 15:12:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/copy-all-data-from-an-mxd/m-p/728327#M7867</guid>
      <dc:creator>JeffBarrette</dc:creator>
      <dc:date>2011-03-08T15:12:58Z</dc:date>
    </item>
    <item>
      <title>Re: copy all data from an mxd</title>
      <link>https://community.esri.com/t5/mapping-questions/copy-all-data-from-an-mxd/m-p/728328#M7868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a couple of queries on this -&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We have data that's stored in SDE and variety of CAD files. For SDE data, the MPK saves the whole file (which can be a problem because we want to store more data in SDE and our geographic regions can be provincial up to continental in size). Is there a way of saving only a specified area of interest?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;With CAD, the data is by defauly unprojected. I've not had any luck defining a projection after getting errors with the validation tool. Any suggestions for getting around this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Kieran&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2011 21:48:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/copy-all-data-from-an-mxd/m-p/728328#M7868</guid>
      <dc:creator>KieranSmith</dc:creator>
      <dc:date>2011-03-09T21:48:27Z</dc:date>
    </item>
    <item>
      <title>Re: copy all data from an mxd</title>
      <link>https://community.esri.com/t5/mapping-questions/copy-all-data-from-an-mxd/m-p/728329#M7869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Just a note - this thread is getting really fragmented.&amp;nbsp; It is best to create a new thread when the topic is being changed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is a response to Christopher.&amp;nbsp; This following code updates the mxd.description&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy, os&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;parentDir = r"C:\Demos\MapAutomation\SaveToPDF"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;for (path, dirs, files) in os.walk(parentDir):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;for filename in files:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;if filename.lower().endswith(".mxd"):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;mxd = arcpy.mapping.MapDocument(os.path.join(path, filename))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;print mxd.filePath&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;mxd.description = "python test"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;mxd.save()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Get rid of the "&amp;gt;&amp;gt;" symbols.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Mar 2011 22:33:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/copy-all-data-from-an-mxd/m-p/728329#M7869</guid>
      <dc:creator>JeffBarrette</dc:creator>
      <dc:date>2011-03-10T22:33:10Z</dc:date>
    </item>
  </channel>
</rss>

