<?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 Map Series: Apply Map Angle rotation to text_element akin to North Arrow. in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/map-series-apply-map-angle-rotation-to-text/m-p/1543870#M88702</link>
    <description>&lt;P&gt;ArcGIS Pro Version 3.2.2&lt;BR /&gt;&lt;BR /&gt;Hello!&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Within a map series, I have an attribute of the Index Layer "MapAngle" that informs the rotation of each page. This intuitively adjusts the North Arrow across each page of the layout. Alongside my North Arrow rotation, I would like to apply the same MapAngle rotation to my reference scale (Ex. 1"=200')&amp;nbsp;&lt;STRONG&gt;for each page in the map series.&amp;nbsp;&lt;/STRONG&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Desired Outcome:&amp;nbsp;&lt;/STRONG&gt;A Scale reference that automatically rotates and updates with dynamic text for each page in a map series layout.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SB_Brent_0-1727709613045.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/116142i1851611DDFABAC30/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SB_Brent_0-1727709613045.png" alt="SB_Brent_0-1727709613045.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SB_Brent_2-1727713425648.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/116160i8A4B8EA0A68ACC81/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SB_Brent_2-1727713425648.png" alt="SB_Brent_2-1727713425648.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Methods&lt;/STRONG&gt; &lt;STRONG&gt;Explored:&lt;/STRONG&gt;&lt;BR /&gt;1. Adjusting the Text feature element properties allows for an individual Rotational call, but it does not reference "MapAngle" and adjust appropriately across the Map Series.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;2.&amp;nbsp; Using Python, I attempted to rotate the text element for each page in the map series, with an excerpt of the script ran below. I was able to execute my script, but without success. I suspect the script iterates through the map series and rotates the box, but does not store any of these changes to rotate with each page. Functionally just rotating the box, and restoring it to the final call in the series (0 Rotation).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;# Loop through each page in the map series&lt;BR /&gt;for page_num in range(1, map_series.pageCount + 1):&lt;BR /&gt;# Set the current page&lt;BR /&gt;map_series.currentPageID = page_num&lt;BR /&gt;&lt;BR /&gt;# Get the current page's MapAngle&lt;BR /&gt;where_clause = f"OBJECTID = {page_num}"&amp;nbsp;&lt;BR /&gt;with arcpy.da.SearchCursor(page_index_layer, ["MapAngle"], where_clause) as cursor:&lt;BR /&gt;for row in cursor:&lt;BR /&gt;map_angle = row[0]&lt;BR /&gt;&lt;BR /&gt;# Find the text box object&lt;BR /&gt;text_box = layout.listElements("TEXT_ELEMENT", "RotationBox")&lt;BR /&gt;if text_box:&lt;BR /&gt;text_box = text_box[0]&lt;BR /&gt;# Apply the rotation&lt;BR /&gt;text_box.rotation = map_angle&lt;BR /&gt;print(f"Set rotation for page {page_num}: {map_angle} degrees")&lt;BR /&gt;else:&lt;BR /&gt;print("Text box 'RotationBox' not found.")&lt;BR /&gt;&lt;BR /&gt;3.&amp;nbsp;I was encouraged to create a custom North Arrow Style - but was unable to include dynamic text as an element within a North Arrow. This solution seems most desired, where the scale reference would be embedded within the North Arrow. I had limited luck with this method as well. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Any Insights or wisdom provided is greatly appreciated, and thank you in advance.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 30 Sep 2024 16:27:12 GMT</pubDate>
    <dc:creator>SB_Brent</dc:creator>
    <dc:date>2024-09-30T16:27:12Z</dc:date>
    <item>
      <title>Map Series: Apply Map Angle rotation to text_element akin to North Arrow.</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/map-series-apply-map-angle-rotation-to-text/m-p/1543870#M88702</link>
      <description>&lt;P&gt;ArcGIS Pro Version 3.2.2&lt;BR /&gt;&lt;BR /&gt;Hello!&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Within a map series, I have an attribute of the Index Layer "MapAngle" that informs the rotation of each page. This intuitively adjusts the North Arrow across each page of the layout. Alongside my North Arrow rotation, I would like to apply the same MapAngle rotation to my reference scale (Ex. 1"=200')&amp;nbsp;&lt;STRONG&gt;for each page in the map series.&amp;nbsp;&lt;/STRONG&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Desired Outcome:&amp;nbsp;&lt;/STRONG&gt;A Scale reference that automatically rotates and updates with dynamic text for each page in a map series layout.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SB_Brent_0-1727709613045.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/116142i1851611DDFABAC30/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SB_Brent_0-1727709613045.png" alt="SB_Brent_0-1727709613045.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SB_Brent_2-1727713425648.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/116160i8A4B8EA0A68ACC81/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SB_Brent_2-1727713425648.png" alt="SB_Brent_2-1727713425648.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Methods&lt;/STRONG&gt; &lt;STRONG&gt;Explored:&lt;/STRONG&gt;&lt;BR /&gt;1. Adjusting the Text feature element properties allows for an individual Rotational call, but it does not reference "MapAngle" and adjust appropriately across the Map Series.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;2.&amp;nbsp; Using Python, I attempted to rotate the text element for each page in the map series, with an excerpt of the script ran below. I was able to execute my script, but without success. I suspect the script iterates through the map series and rotates the box, but does not store any of these changes to rotate with each page. Functionally just rotating the box, and restoring it to the final call in the series (0 Rotation).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;# Loop through each page in the map series&lt;BR /&gt;for page_num in range(1, map_series.pageCount + 1):&lt;BR /&gt;# Set the current page&lt;BR /&gt;map_series.currentPageID = page_num&lt;BR /&gt;&lt;BR /&gt;# Get the current page's MapAngle&lt;BR /&gt;where_clause = f"OBJECTID = {page_num}"&amp;nbsp;&lt;BR /&gt;with arcpy.da.SearchCursor(page_index_layer, ["MapAngle"], where_clause) as cursor:&lt;BR /&gt;for row in cursor:&lt;BR /&gt;map_angle = row[0]&lt;BR /&gt;&lt;BR /&gt;# Find the text box object&lt;BR /&gt;text_box = layout.listElements("TEXT_ELEMENT", "RotationBox")&lt;BR /&gt;if text_box:&lt;BR /&gt;text_box = text_box[0]&lt;BR /&gt;# Apply the rotation&lt;BR /&gt;text_box.rotation = map_angle&lt;BR /&gt;print(f"Set rotation for page {page_num}: {map_angle} degrees")&lt;BR /&gt;else:&lt;BR /&gt;print("Text box 'RotationBox' not found.")&lt;BR /&gt;&lt;BR /&gt;3.&amp;nbsp;I was encouraged to create a custom North Arrow Style - but was unable to include dynamic text as an element within a North Arrow. This solution seems most desired, where the scale reference would be embedded within the North Arrow. I had limited luck with this method as well. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Any Insights or wisdom provided is greatly appreciated, and thank you in advance.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2024 16:27:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/map-series-apply-map-angle-rotation-to-text/m-p/1543870#M88702</guid>
      <dc:creator>SB_Brent</dc:creator>
      <dc:date>2024-09-30T16:27:12Z</dc:date>
    </item>
  </channel>
</rss>

