<?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 How to set layout view scale in Pro in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-to-set-layout-view-scale-in-pro/m-p/1239727#M66240</link>
    <description>&lt;P&gt;Is there a way to set the scale of the layout view in Pro, similar to ArcMap?&lt;/P&gt;&lt;P&gt;For example in Arcmap&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;lyr = arcpy.mapping.ListLayers(mxd, "lyr")[0]
df.extent = lyr.getSelectedExtent()
df.scale = 24000
arcpy.RefreshActiveView()
arcpy.RefreshTOC()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In pro I can't seem to get set&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;aprx = arcpy.mp.ArcGISProject("CURRENT")
map = aprx.listMaps()[0]
#lyr = map.listLayers("SUBJECT_PROPERTY")[0]
lyt = aprx.listLayouts("Map")[0]
mf = lyt.listElements("MAPFRAME_ELEMENT")[0]
#mf.camera.setExtent(mf.getLayerExtent(lyr, False, True))

ext = map.defaultCamera.getExtent()
mf.camera.scale *= 1.25 #some how set this to 1:24,000&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2Quiker_1-1670607101920.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/58155i1EAD7C85CBE0BD7A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2Quiker_1-1670607101920.png" alt="2Quiker_1-1670607101920.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Dec 2022 17:39:05 GMT</pubDate>
    <dc:creator>2Quiker</dc:creator>
    <dc:date>2022-12-09T17:39:05Z</dc:date>
    <item>
      <title>How to set layout view scale in Pro</title>
      <link>https://community.esri.com/t5/python-questions/how-to-set-layout-view-scale-in-pro/m-p/1239727#M66240</link>
      <description>&lt;P&gt;Is there a way to set the scale of the layout view in Pro, similar to ArcMap?&lt;/P&gt;&lt;P&gt;For example in Arcmap&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;lyr = arcpy.mapping.ListLayers(mxd, "lyr")[0]
df.extent = lyr.getSelectedExtent()
df.scale = 24000
arcpy.RefreshActiveView()
arcpy.RefreshTOC()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In pro I can't seem to get set&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;aprx = arcpy.mp.ArcGISProject("CURRENT")
map = aprx.listMaps()[0]
#lyr = map.listLayers("SUBJECT_PROPERTY")[0]
lyt = aprx.listLayouts("Map")[0]
mf = lyt.listElements("MAPFRAME_ELEMENT")[0]
#mf.camera.setExtent(mf.getLayerExtent(lyr, False, True))

ext = map.defaultCamera.getExtent()
mf.camera.scale *= 1.25 #some how set this to 1:24,000&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2Quiker_1-1670607101920.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/58155i1EAD7C85CBE0BD7A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2Quiker_1-1670607101920.png" alt="2Quiker_1-1670607101920.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Dec 2022 17:39:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-set-layout-view-scale-in-pro/m-p/1239727#M66240</guid>
      <dc:creator>2Quiker</dc:creator>
      <dc:date>2022-12-09T17:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to set layout view scale in Pro</title>
      <link>https://community.esri.com/t5/python-questions/how-to-set-layout-view-scale-in-pro/m-p/1242882#M66318</link>
      <description>&lt;P&gt;Steps are given below-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do one of the following to choose Properties. On the menu, choose Modify &amp;gt; Properties.&lt;BR /&gt;Select the edge of the layout viewport.&lt;BR /&gt;In Custom Scale, enter the scale at which you want to view model space entities from within the layout viewport.&lt;BR /&gt;Click OK.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rachel Gomez&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 06:28:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-set-layout-view-scale-in-pro/m-p/1242882#M66318</guid>
      <dc:creator>RachelGomez</dc:creator>
      <dc:date>2022-12-21T06:28:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to set layout view scale in Pro</title>
      <link>https://community.esri.com/t5/python-questions/how-to-set-layout-view-scale-in-pro/m-p/1245766#M66419</link>
      <description>&lt;P&gt;After trying your suggestion but, but after I run the code the zoomed scale changed.&lt;/P&gt;&lt;P&gt;I am curious to see how people, if anyone is getting zoomed scale like in Arcmap with Python.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2023 19:23:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-set-layout-view-scale-in-pro/m-p/1245766#M66419</guid>
      <dc:creator>2Quiker</dc:creator>
      <dc:date>2023-01-05T19:23:14Z</dc:date>
    </item>
  </channel>
</rss>

