<?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: exporting layout view in arcpy in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/exporting-layout-view-in-arcpy/m-p/728037#M56458</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It almost works,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I set data_frame = "PAGE_LAYOUT" and took out df and replaced with data_frame&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It is now exporting the layout view with all text and mapsurround elements etc... but NOT the data (time enabled layer file)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you know why this is? is it bc i'm not calling the dataframe anymore?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Mar 2013 17:56:25 GMT</pubDate>
    <dc:creator>courtneygarlock</dc:creator>
    <dc:date>2013-03-27T17:56:25Z</dc:date>
    <item>
      <title>exporting layout view in arcpy</title>
      <link>https://community.esri.com/t5/python-questions/exporting-layout-view-in-arcpy/m-p/728035#M56456</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 am trying to export the layout view in arcmap by using the following script:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import os&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;mxd = arcpy.mapping.MapDocument(r"C:\Project\Project.mxd")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;df = arcpy.mapping.ListDataFrames(mxd, "Traffic Analysis")[0]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;df.time.currentTime = df.time.startTime&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;while df.time.currentTime &amp;lt;= df.time.endTime:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # An example str(newTime) would be: "2008-12-29 02:19:59"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # The following line splits the string at the space and takes the first &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # item in the resulting string.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fileName = str(df.time.currentTime).split(" ")[0] + ".jpg"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.mapping.ExportToJPEG(mxd, os.path.join(r"C:\Project\Output", fileName), df)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; df.time.currentTime = df.time.currentTime + df.time.timeStepInterval&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;del mxd&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This only exports the "data veiw" map but I want the "layout view"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is python cabable of this....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can set the mxd.activeView = 'PAGE_LAYOUT' &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;so when the mxd is opened it always opens to the page layout. I thougth that would allow images to export from that page but it &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;doesn't seem to be the case.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it possible??&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Mar 2013 16:51:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/exporting-layout-view-in-arcpy/m-p/728035#M56456</guid>
      <dc:creator>courtneygarlock</dc:creator>
      <dc:date>2013-03-27T16:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: exporting layout view in arcpy</title>
      <link>https://community.esri.com/t5/python-questions/exporting-layout-view-in-arcpy/m-p/728036#M56457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You are having issues because you are specifying a dataframe to export. You cannot export a dataframe by layout view.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;arcpy.mapping.ExportToJPEG(mxd, os.path.join(r"C:\Project\Output", fileName), df)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can read the help on the tool here to get the proper parameter.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//00s300000038000000"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//00s300000038000000&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Mar 2013 16:59:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/exporting-layout-view-in-arcpy/m-p/728036#M56457</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2013-03-27T16:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: exporting layout view in arcpy</title>
      <link>https://community.esri.com/t5/python-questions/exporting-layout-view-in-arcpy/m-p/728037#M56458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It almost works,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I set data_frame = "PAGE_LAYOUT" and took out df and replaced with data_frame&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It is now exporting the layout view with all text and mapsurround elements etc... but NOT the data (time enabled layer file)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you know why this is? is it bc i'm not calling the dataframe anymore?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Mar 2013 17:56:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/exporting-layout-view-in-arcpy/m-p/728037#M56458</guid>
      <dc:creator>courtneygarlock</dc:creator>
      <dc:date>2013-03-27T17:56:25Z</dc:date>
    </item>
  </channel>
</rss>

