<?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, aprx, layouts and maps... yeah! ArcGIS Pro - oh no! in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-aprx-layouts-and-maps-yeah-arcgis-pro-oh-no/m-p/123005#M9551</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good catch.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are you suggesting that it would be useful to check the size of the legend element and compare it to the page size?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/arcpy/mapping/legendelement-class.htm" title="https://pro.arcgis.com/en/pro-app/arcpy/mapping/legendelement-class.htm"&gt;LegendElement—ArcPy | Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE style="color: #4c4c4c; background-color: #ffffff; border: 1px solid #cccccc; font-size: 0.875rem; margin-bottom: 1.55rem;"&gt;&lt;TBODY&gt;&lt;TR style="border-bottom: 1px solid #cccccc;"&gt;&lt;TD style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-weight: 300; padding: 0.51667rem;"&gt;elementWidth&lt;DIV class=""&gt;(Read and Write)&lt;/DIV&gt;&lt;/TD&gt;&lt;TD style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-weight: 300; padding: 0.51667rem;"&gt;&lt;P&gt;The width of the element in page units.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/arcpy/mapping/mapframe-class.htm" title="https://pro.arcgis.com/en/pro-app/arcpy/mapping/mapframe-class.htm"&gt;MapFrame—ArcPy | Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;same as for MapFrame&lt;/P&gt;&lt;TABLE style="color: #4c4c4c; background-color: #ffffff; border: 1px solid #cccccc; font-size: 0.875rem; margin-bottom: 1.55rem;"&gt;&lt;TBODY&gt;&lt;TR style="border-bottom: 1px solid #cccccc;"&gt;&lt;TD style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-weight: 300; padding: 0.51667rem;"&gt;elementWidth&lt;DIV class=""&gt;(Read and Write)&lt;/DIV&gt;&lt;/TD&gt;&lt;TD style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-weight: 300; padding: 0.51667rem;"&gt;&lt;P&gt;The width of the map frame on the page layout. The units assigned or reported are in page units.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Maybe these checks aren't automatic.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Mar 2020 23:50:34 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2020-03-04T23:50:34Z</dc:date>
    <item>
      <title>Arcpy, aprx, layouts and maps... yeah! ArcGIS Pro - oh no!</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-aprx-layouts-and-maps-yeah-arcgis-pro-oh-no/m-p/123004#M9550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Love the fact that you can interact with APRX projects so well in Python using arcpy. Iterating through maps and layout, layers, or layout elements. But while trying to automate map&amp;nbsp;making, I kept banging my head against the well because despite things like:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;# loop through layout&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;listElements

&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; elem&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;type &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'LEGEND_ELEMENT'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        legend &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; elem&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
# &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;
legend&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;syncLayerVisibility &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; True
legend&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;syncLayerOrder &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; True‍‍‍‍‍‍‍‍‍‍‍‍
# &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;
layout&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;exportToPDF&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;PDF_File&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; resolution &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;300&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;my legend wouldn't show up in the PDF I'm generating. Then I noticed that I could see it containing only one layer inside of ArcGIS Pro where&amp;nbsp;my layout is set up instead of showing ALL layers. After trying everything imaginable (and more) in my code and getting blisters on my finger tips navigating the ridiculous panes of pain in Pro, I realized that the current width of my legend element was too much for the page width. But it didn't just cut off the text labels of some of the items - it hid them completely and therefore rendered a blank legend in the app, which leads to a blank legend in the PDF. Oh, come on!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:04:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-aprx-layouts-and-maps-yeah-arcgis-pro-oh-no/m-p/123004#M9550</guid>
      <dc:creator>Arne_Gelfert</dc:creator>
      <dc:date>2021-12-11T07:04:40Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy, aprx, layouts and maps... yeah! ArcGIS Pro - oh no!</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-aprx-layouts-and-maps-yeah-arcgis-pro-oh-no/m-p/123005#M9551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good catch.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are you suggesting that it would be useful to check the size of the legend element and compare it to the page size?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/arcpy/mapping/legendelement-class.htm" title="https://pro.arcgis.com/en/pro-app/arcpy/mapping/legendelement-class.htm"&gt;LegendElement—ArcPy | Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE style="color: #4c4c4c; background-color: #ffffff; border: 1px solid #cccccc; font-size: 0.875rem; margin-bottom: 1.55rem;"&gt;&lt;TBODY&gt;&lt;TR style="border-bottom: 1px solid #cccccc;"&gt;&lt;TD style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-weight: 300; padding: 0.51667rem;"&gt;elementWidth&lt;DIV class=""&gt;(Read and Write)&lt;/DIV&gt;&lt;/TD&gt;&lt;TD style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-weight: 300; padding: 0.51667rem;"&gt;&lt;P&gt;The width of the element in page units.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/arcpy/mapping/mapframe-class.htm" title="https://pro.arcgis.com/en/pro-app/arcpy/mapping/mapframe-class.htm"&gt;MapFrame—ArcPy | Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;same as for MapFrame&lt;/P&gt;&lt;TABLE style="color: #4c4c4c; background-color: #ffffff; border: 1px solid #cccccc; font-size: 0.875rem; margin-bottom: 1.55rem;"&gt;&lt;TBODY&gt;&lt;TR style="border-bottom: 1px solid #cccccc;"&gt;&lt;TD style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-weight: 300; padding: 0.51667rem;"&gt;elementWidth&lt;DIV class=""&gt;(Read and Write)&lt;/DIV&gt;&lt;/TD&gt;&lt;TD style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-weight: 300; padding: 0.51667rem;"&gt;&lt;P&gt;The width of the map frame on the page layout. The units assigned or reported are in page units.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Maybe these checks aren't automatic.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Mar 2020 23:50:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-aprx-layouts-and-maps-yeah-arcgis-pro-oh-no/m-p/123005#M9551</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2020-03-04T23:50:34Z</dc:date>
    </item>
  </channel>
</rss>

