<?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: ArcPy: Data Driven Pages to Individual Map Packages in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-data-driven-pages-to-individual-map-packages/m-p/375154#M29646</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Peter&lt;/P&gt;&lt;P&gt;some info from... &lt;A href="http://desktop.arcgis.com/en/desktop/latest/analyze/arcpy-mapping/dataframe-class.htm" title="http://desktop.arcgis.com/en/desktop/latest/analyze/arcpy-mapping/dataframe-class.htm"&gt;DataFrame—Help | ArcGIS for Desktop&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;&lt;SPAN style="color: #4d4d4d; font-family: 'Lucida Grande', 'Segoe UI', Arial, sans-serif; background-color: #fefefe;"&gt;The data frame &lt;/SPAN&gt;&lt;SPAN class="arcpyref" style="font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-weight: bold; color: #4d4d4d;"&gt;extent&lt;/SPAN&gt;&lt;/EM&gt;&lt;SPAN style="color: #4d4d4d; font-family: 'Lucida Grande', 'Segoe UI', Arial, sans-serif; background-color: #fefefe;"&gt;&lt;EM&gt; coordinates are based on the extent of the data frame in Layout View, not in Data View. This is because the shape of the data frame in Data View may have a different aspect ratio than the data frame in Layout View&lt;/EM&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4d4d4d; font-family: 'Lucida Grande', 'Segoe UI', Arial, sans-serif; background-color: #fefefe;"&gt;So if this persists arcgis Pro may solve the problem... no more one layout...no more shifting and shuffling onto the layout page... kind of like the arcgis 3.x days &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 24 Jan 2016 00:05:58 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2016-01-24T00:05:58Z</dc:date>
    <item>
      <title>ArcPy: Data Driven Pages to Individual Map Packages</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-data-driven-pages-to-individual-map-packages/m-p/375151#M29643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I came across the following sample code that Chris Fox from esri wrote as a way to create a new mxd for each Data Driven Page:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;mxdPath = r"C:\Project\DDPMap.mxd"
mxd = arcpy.mapping.MapDocument(mxdPath)
mxdDir = os.path.dirname(mxdPath)
for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1):
&amp;nbsp;&amp;nbsp;&amp;nbsp; mxd.dataDrivenPages.currentPageID = pageNum
&amp;nbsp;&amp;nbsp;&amp;nbsp; mxdName = os.path.join(mxdDir, "DDPMap", + str(pageNum) + ".mxd")
&amp;nbsp;&amp;nbsp;&amp;nbsp; mxd.saveACopy(mxdName)
del mxd&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there&amp;nbsp; a way to create a map package for each Data Driven Page instead of having to save it out first as a new mxd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcpy package map sample:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;for mxd in arcpy.ListFiles("*.mxd"):
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage("Packaging: {}".format(mxd))
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.PackageMap_management(mxd, os.path.splittext(mxd) [0] + ".mpk", "PRESERVE", "CONVERT_ARCSDE", "DISPLAY", "ALL")&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:21:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-data-driven-pages-to-individual-map-packages/m-p/375151#M29643</guid>
      <dc:creator>PeterWilson</dc:creator>
      <dc:date>2021-12-11T17:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: ArcPy: Data Driven Pages to Individual Map Packages</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-data-driven-pages-to-individual-map-packages/m-p/375152#M29644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;given it wants a project &lt;A href="http://desktop.arcgis.com/en/desktop/latest/tools/data-management-toolbox/package-map.htm" title="http://desktop.arcgis.com/en/desktop/latest/tools/data-management-toolbox/package-map.htm"&gt;Package Map—Help | ArcGIS for Desktop&lt;/A&gt;&lt;/P&gt;&lt;P&gt;as its primary input, I am not sure how you could circumvent that but there is lots of stuff in the package toolkit&lt;/P&gt;&lt;P&gt;&lt;A href="http://desktop.arcgis.com/en/desktop/latest/tools/data-management-toolbox/an-overview-of-the-package-toolset.htm" title="http://desktop.arcgis.com/en/desktop/latest/tools/data-management-toolbox/an-overview-of-the-package-toolset.htm"&gt;An overview of the Package toolset—Help | ArcGIS for Desktop&lt;/A&gt;&lt;/P&gt;&lt;P&gt;but there is this quasi-related thread&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/message/234479"&gt;Re: Export Data Driven Pages to MXD with file name by Page Name&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jan 2016 22:06:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-data-driven-pages-to-individual-map-packages/m-p/375152#M29644</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-01-20T22:06:30Z</dc:date>
    </item>
    <item>
      <title>Re: ArcPy: Data Driven Pages to Individual Map Packages</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-data-driven-pages-to-individual-map-packages/m-p/375153#M29645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've successfully created a python script that generates a map package for each data driven page. The only stumbling block that I still have is that the extent parameter for package map is based on the active data frame extent and not individually for each data frame. This is a shame as a lot of maps have a data frame that represents a inset of your study area. I'd like to clip my data to the extent of each data frame before creating a map package as to reduce the data being replicated for each map package.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've attached my python script if anyone is interested.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Jan 2016 22:52:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-data-driven-pages-to-individual-map-packages/m-p/375153#M29645</guid>
      <dc:creator>PeterWilson</dc:creator>
      <dc:date>2016-01-23T22:52:38Z</dc:date>
    </item>
    <item>
      <title>Re: ArcPy: Data Driven Pages to Individual Map Packages</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-data-driven-pages-to-individual-map-packages/m-p/375154#M29646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Peter&lt;/P&gt;&lt;P&gt;some info from... &lt;A href="http://desktop.arcgis.com/en/desktop/latest/analyze/arcpy-mapping/dataframe-class.htm" title="http://desktop.arcgis.com/en/desktop/latest/analyze/arcpy-mapping/dataframe-class.htm"&gt;DataFrame—Help | ArcGIS for Desktop&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;&lt;SPAN style="color: #4d4d4d; font-family: 'Lucida Grande', 'Segoe UI', Arial, sans-serif; background-color: #fefefe;"&gt;The data frame &lt;/SPAN&gt;&lt;SPAN class="arcpyref" style="font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-weight: bold; color: #4d4d4d;"&gt;extent&lt;/SPAN&gt;&lt;/EM&gt;&lt;SPAN style="color: #4d4d4d; font-family: 'Lucida Grande', 'Segoe UI', Arial, sans-serif; background-color: #fefefe;"&gt;&lt;EM&gt; coordinates are based on the extent of the data frame in Layout View, not in Data View. This is because the shape of the data frame in Data View may have a different aspect ratio than the data frame in Layout View&lt;/EM&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4d4d4d; font-family: 'Lucida Grande', 'Segoe UI', Arial, sans-serif; background-color: #fefefe;"&gt;So if this persists arcgis Pro may solve the problem... no more one layout...no more shifting and shuffling onto the layout page... kind of like the arcgis 3.x days &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 Jan 2016 00:05:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-data-driven-pages-to-individual-map-packages/m-p/375154#M29646</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-01-24T00:05:58Z</dc:date>
    </item>
    <item>
      <title>Re: ArcPy: Data Driven Pages to Individual Map Packages</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-data-driven-pages-to-individual-map-packages/m-p/375155#M29647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Peter... related but not a solution but you may find it interesting &lt;A href="http://www.arcgis.com/home/item.html?id=a9b032f739254ebeb6221c9294ebc886" title="http://www.arcgis.com/home/item.html?id=a9b032f739254ebeb6221c9294ebc886"&gt;http://www.arcgis.com/home/item.html?id=a9b032f739254ebeb6221c9294ebc886&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 Jan 2016 01:28:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-data-driven-pages-to-individual-map-packages/m-p/375155#M29647</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-01-24T01:28:27Z</dc:date>
    </item>
  </channel>
</rss>

