<?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.mp export layout missing the full view of the scale bar in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-mp-export-layout-missing-the-full-view-of/m-p/1252697#M66703</link>
    <description>&lt;P&gt;Thanks for the follow-up, Dan. I read that post before posting the question and thought there might be solutions that have not been posted since the old post mentioned some potential changes in ArcGIS Pro 3.0&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1134"&gt;@JeffBarrette&lt;/a&gt;&amp;nbsp;I am still exploring arcpy.mp and curious about the possible workaround mentioned last year by Jeff to create a map frame that is the same size of a layout. How do I do that? But this solution won't export the layout elements, right? I am only interested in running scripts/codes outside of the application.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 29 Jan 2023 15:27:34 GMT</pubDate>
    <dc:creator>DongmeiChen</dc:creator>
    <dc:date>2023-01-29T15:27:34Z</dc:date>
    <item>
      <title>Arcpy.mp export layout missing the full view of the scale bar</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-mp-export-layout-missing-the-full-view-of/m-p/1252682#M66701</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope to get some help to export a layout using arcpy.mp with a full view of the scale bar and WITHOUT any manual steps. This is what the export should look like:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MapExample.jpg" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/61549iDD195DE49EF24B7D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MapExample.jpg" alt="MapExample.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; But what I can get without manually saving a copy of the project looks like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Map.jpg" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/61550iEF145738640A3345/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Map.jpg" alt="Map.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; It looks like the initial view of the layout when I open the ArcGIS Pro project and when the scale bar is not fully shown. There is a step to zoom-to-layer before the layout export.&lt;/P&gt;&lt;P&gt;aprx = arcpy.mp.ArcGISProject(path + "\\IllegalCampsMap.aprx")&lt;BR /&gt;lyt = aprx.listLayouts("Map*")[0]&lt;BR /&gt;mf = lyt.listElements("mapframe_element", "*")[0]&lt;BR /&gt;m = aprx.listMaps("Map")[0]&lt;BR /&gt;lyr = m.listLayers("Campsite")[0]&lt;BR /&gt;mf.camera.setExtent(mf.getLayerExtent(lyr, False, True))&lt;BR /&gt;lyt.exportToJPEG(path+"\\"+lyt.name+".jpg")&lt;/P&gt;&lt;P&gt;If I save the project manually after the zoom-to-layer with a different name, the export looks okay.&lt;/P&gt;&lt;P&gt;&amp;nbsp;aprx = arcpy.mp.ArcGISProject(path + "\\IllegalCampsView.aprx")&lt;BR /&gt;lyt = aprx.listLayouts("Map*")[0]&lt;BR /&gt;lyt.exportToJPEG(path+"\\"+lyt.name+".jpg")&lt;/P&gt;&lt;P&gt;I am trying to avoid the manual save step. I did try some workarounds including saving as a different project. Can anyone help explain the reason why I can't export the full layout view and offer a solution? Any feedback is much appreciated!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 29 Jan 2023 15:32:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-mp-export-layout-missing-the-full-view-of/m-p/1252682#M66701</guid>
      <dc:creator>DongmeiChen</dc:creator>
      <dc:date>2023-01-29T15:32:19Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy.mp export layout missing the full view of the scale bar</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-mp-export-layout-missing-the-full-view-of/m-p/1252688#M66702</link>
      <description>&lt;P&gt;From here&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/python-questions/zoom-to-layer-on-the-map-view-arcpy-mp/td-p/1046096" target="_blank"&gt;Solved: Zoom to layer on the map view arcpy.mp - Esri Community&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and the link with the discussion of the extent property&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/arcgisproject-class.htm" target="_blank"&gt;ArcGISProject—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 29 Jan 2023 11:15:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-mp-export-layout-missing-the-full-view-of/m-p/1252688#M66702</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2023-01-29T11:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy.mp export layout missing the full view of the scale bar</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-mp-export-layout-missing-the-full-view-of/m-p/1252697#M66703</link>
      <description>&lt;P&gt;Thanks for the follow-up, Dan. I read that post before posting the question and thought there might be solutions that have not been posted since the old post mentioned some potential changes in ArcGIS Pro 3.0&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1134"&gt;@JeffBarrette&lt;/a&gt;&amp;nbsp;I am still exploring arcpy.mp and curious about the possible workaround mentioned last year by Jeff to create a map frame that is the same size of a layout. How do I do that? But this solution won't export the layout elements, right? I am only interested in running scripts/codes outside of the application.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 29 Jan 2023 15:27:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-mp-export-layout-missing-the-full-view-of/m-p/1252697#M66703</guid>
      <dc:creator>DongmeiChen</dc:creator>
      <dc:date>2023-01-29T15:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy.mp export layout missing the full view of the scale bar</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-mp-export-layout-missing-the-full-view-of/m-p/1253170#M66719</link>
      <description>&lt;P&gt;The solution is to set an extent for the point location before zooming to the layer.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2023 02:40:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-mp-export-layout-missing-the-full-view-of/m-p/1253170#M66719</guid>
      <dc:creator>DongmeiChen</dc:creator>
      <dc:date>2023-01-31T02:40:26Z</dc:date>
    </item>
  </channel>
</rss>

