<?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 Using arcpy to switch to layout view in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/using-arcpy-to-switch-to-layout-view/m-p/182147#M14011</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Looking for arcpy syntax to change a mxd from &lt;/SPAN&gt;&lt;SPAN style="text-decoration:underline;"&gt;data view to layout view &lt;/SPAN&gt;&lt;SPAN&gt;and zoom to a certain scale. The following works to change from layout view to data view, but I also need the opposite. Thanks all!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy, arcpy.mapping as map, sys, os&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mxd = map.MapDocument("CURRENT") &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;data_frame = map.ListDataFrames(mxd)[0] &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Switch to data view&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mxd.activeView=data_frame.name&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;for df in map.ListDataFrames(mxd):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; df.scale=2400&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.RefreshActiveView()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;del mxd&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2011 18:00:14 GMT</pubDate>
    <dc:creator>JuliePaine</dc:creator>
    <dc:date>2011-06-15T18:00:14Z</dc:date>
    <item>
      <title>Using arcpy to switch to layout view</title>
      <link>https://community.esri.com/t5/python-questions/using-arcpy-to-switch-to-layout-view/m-p/182147#M14011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Looking for arcpy syntax to change a mxd from &lt;/SPAN&gt;&lt;SPAN style="text-decoration:underline;"&gt;data view to layout view &lt;/SPAN&gt;&lt;SPAN&gt;and zoom to a certain scale. The following works to change from layout view to data view, but I also need the opposite. Thanks all!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy, arcpy.mapping as map, sys, os&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mxd = map.MapDocument("CURRENT") &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;data_frame = map.ListDataFrames(mxd)[0] &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Switch to data view&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mxd.activeView=data_frame.name&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;for df in map.ListDataFrames(mxd):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; df.scale=2400&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.RefreshActiveView()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;del mxd&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2011 18:00:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-arcpy-to-switch-to-layout-view/m-p/182147#M14011</guid>
      <dc:creator>JuliePaine</dc:creator>
      <dc:date>2011-06-15T18:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: Using arcpy to switch to layout view</title>
      <link>https://community.esri.com/t5/python-questions/using-arcpy-to-switch-to-layout-view/m-p/182148#M14012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;mxd.activeView='PAGE_LAYOUT' should do it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2011 18:32:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-arcpy-to-switch-to-layout-view/m-p/182148#M14012</guid>
      <dc:creator>ChrisMathers</dc:creator>
      <dc:date>2011-06-15T18:32:10Z</dc:date>
    </item>
  </channel>
</rss>

