<?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: Python 3.x syntax for refreshing a map series (formerly DDP) in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-3-x-syntax-for-refreshing-a-map-series/m-p/455073#M35783</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, this is &lt;STRONG&gt;very&lt;/STRONG&gt; frustrating! Refresh does not do what the ArcGIS documentation on Map Series for Pro says it should do. Even if I click the Refresh button in the ribbon, the dynamic labels update, but the map does not update its extent to the location specified by the index layer's updated definition query. I get the same results with the Python code. And, as you point out, Stephen, arcpy.mp doesn't have a zoom to selected features option. I tried zoomToAllLayers(), but it did exactly that -- zoomed to the full extent of every layer in the map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know how to look up bug reports to see if anyone has reported this to Esri?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Jan 2019 21:38:00 GMT</pubDate>
    <dc:creator>AmyRoust</dc:creator>
    <dc:date>2019-01-24T21:38:00Z</dc:date>
    <item>
      <title>Python 3.x syntax for refreshing a map series (formerly DDP)</title>
      <link>https://community.esri.com/t5/python-questions/python-3-x-syntax-for-refreshing-a-map-series/m-p/455067#M35777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;I'm rewriting a Python 2.x script so that it can be used in Pro.&amp;nbsp;I am struggling to figure out the syntax for refreshing a map series in Python. I found this page:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;A class="link-titled" href="http://pro.arcgis.com/en/pro-app/arcpy/mapping/mapseries-class.htm" title="http://pro.arcgis.com/en/pro-app/arcpy/mapping/mapseries-class.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;MapSeries—ArcPy | ArcGIS Desktop&lt;/A&gt;, and I know there is a refresh() method, but I cannot figure out how to use it. I tried&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;lyt &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; aprx&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;listLayouts&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"AgLayout"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; lyr &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; m&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;listLayers&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Parcel*"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    lyr&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;definitionQuery &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"JOINPIN = '201-02-0-00-00-012.03-0'"&lt;/SPAN&gt;

lyt&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;refresh&lt;SPAN class="punctuation token"&gt;(&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Line 6 throws an error that says "AttributeError: 'Layout' object has no attribute 'refresh'&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:17:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-3-x-syntax-for-refreshing-a-map-series/m-p/455067#M35777</guid>
      <dc:creator>AmyRoust</dc:creator>
      <dc:date>2021-12-11T20:17:57Z</dc:date>
    </item>
    <item>
      <title>Re: Python 3.x syntax for refreshing a map series (formerly DDP)</title>
      <link>https://community.esri.com/t5/python-questions/python-3-x-syntax-for-refreshing-a-map-series/m-p/455068#M35778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="link-titled" href="http://pro.arcgis.com/en/pro-app/arcpy/mapping/mapseries-class.htm" title="http://pro.arcgis.com/en/pro-app/arcpy/mapping/mapseries-class.htm"&gt;MapSeries—ArcPy | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;with limitations&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="color: #4c4c4c; font-family: &amp;amp;quot; avenir next w01&amp;amp;quot;,&amp;amp;quot;avenir next w00&amp;amp;quot;,&amp;amp;quot;avenir next&amp;amp;quot;,&amp;amp;quot;avenir&amp;amp;quot;,&amp;amp;quot;helvetica neue&amp;amp;quot;,sans-serif; font-size: 17px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;&lt;PRE style="font-family: &amp;amp;quot; consolas&amp;amp;quot;,&amp;amp;quot;andale mono&amp;amp;quot;,&amp;amp;quot;lucida console&amp;amp;quot;,&amp;amp;quot;monaco&amp;amp;quot;,monospace; margin-bottom: 1.55rem; max-width: 100%; overflow-wrap: break-word; white-space: pre-wrap;"&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;STRONG style="font-weight: 500;"&gt;refresh ()&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV style="color: #4c4c4c; font-family: &amp;amp;quot; avenir next w01&amp;amp;quot;,&amp;amp;quot;avenir next w00&amp;amp;quot;,&amp;amp;quot;avenir next&amp;amp;quot;,&amp;amp;quot;avenir&amp;amp;quot;,&amp;amp;quot;helvetica neue&amp;amp;quot;,sans-serif; font-size: 17px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;&lt;P style="margin-bottom: 1.55rem; margin-top: 0px;"&gt;&lt;SPAN style="font-size: 13px;"&gt;Use the &lt;SPAN style="font-family: &amp;amp;quot;"&gt;refresh&lt;/SPAN&gt; method if any of the following occurs:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL style="font-size: 0.93rem; line-height: 1.55rem; list-style-position: inside; margin-bottom: 1.55rem; margin-left: 0.77rem; margin-top: 0px; padding: 0px;"&gt;&lt;LI style="list-style-position: outside; margin: 0.38rem 0px 0.38rem 1.5rem;"&gt;&lt;SPAN style="font-size: 13px;"&gt;Features are added to or deleted from your index layer.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="list-style-position: outside; margin: 0.38rem 0px 0.38rem 1.5rem;"&gt;&lt;SPAN style="font-size: 13px;"&gt;Updates are made to the index field values.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="list-style-position: outside; margin: 0.38rem 0px 0.38rem 1.5rem;"&gt;&lt;SPAN style="font-size: 13px;"&gt;The map frame extent is changed due to zooming, panning, or change to map scale.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2019 21:59:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-3-x-syntax-for-refreshing-a-map-series/m-p/455068#M35778</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2019-01-23T21:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: Python 3.x syntax for refreshing a map series (formerly DDP)</title>
      <link>https://community.esri.com/t5/python-questions/python-3-x-syntax-for-refreshing-a-map-series/m-p/455069#M35779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Once the script is completely rewritten, the user will input a PIN number for the parcel being mapped. When that PIN number changes, it will meet the criteria for using the refresh method. I just can't figure out how to tell it to refresh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2019 22:04:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-3-x-syntax-for-refreshing-a-map-series/m-p/455069#M35779</guid>
      <dc:creator>AmyRoust</dc:creator>
      <dc:date>2019-01-23T22:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: Python 3.x syntax for refreshing a map series (formerly DDP)</title>
      <link>https://community.esri.com/t5/python-questions/python-3-x-syntax-for-refreshing-a-map-series/m-p/455070#M35780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to access the mapSeries property of the &lt;A href="http://pro.arcgis.com/en/pro-app/arcpy/mapping/layout-class.htm"&gt;Layout object&lt;/A&gt;, since refresh() is a method of the mapSeries object. Something like &lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;lyt.mapSeries.refresh()&lt;/SPAN&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2019 22:19:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-3-x-syntax-for-refreshing-a-map-series/m-p/455070#M35780</guid>
      <dc:creator>StephenM</dc:creator>
      <dc:date>2019-01-23T22:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: Python 3.x syntax for refreshing a map series (formerly DDP)</title>
      <link>https://community.esri.com/t5/python-questions/python-3-x-syntax-for-refreshing-a-map-series/m-p/455071#M35781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That worked! Well, OK, it refreshed the dynamic text that I had on the page, but it did not refresh the map's extent to go to the new PIN. Maybe that's a bug?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2019 22:34:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-3-x-syntax-for-refreshing-a-map-series/m-p/455071#M35781</guid>
      <dc:creator>AmyRoust</dc:creator>
      <dc:date>2019-01-23T22:34:10Z</dc:date>
    </item>
    <item>
      <title>Re: Python 3.x syntax for refreshing a map series (formerly DDP)</title>
      <link>https://community.esri.com/t5/python-questions/python-3-x-syntax-for-refreshing-a-map-series/m-p/455072#M35782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah, based on the documentation it sounds like it might be a bug (maybe related to the &lt;A _jive_internal="true" href="https://community.esri.com/thread/194310-zoom-map-to-an-layer-in-arcpymp-arcgis-pro-project"&gt;inability to set the map extent&lt;/A&gt; in a map view using arcpy.mp). Are you using the PIN to update the layer's definition query? I notice that in ArcMap refreshing the data driven pages zooms to the visible features, but as you say, refreshing the map series doesn't change the map's extent in Pro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you're using definition queries, the zoomToAllLayers() method of the &lt;A href="http://pro.arcgis.com/en/pro-app/arcpy/mapping/mapframe-class.htm"&gt;MapFrame&lt;/A&gt; class might provide what you're looking for. Something like&amp;nbsp;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;lyt.mapSeries.mapFrame.zoomToAllLayers()&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2019 00:47:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-3-x-syntax-for-refreshing-a-map-series/m-p/455072#M35782</guid>
      <dc:creator>StephenM</dc:creator>
      <dc:date>2019-01-24T00:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: Python 3.x syntax for refreshing a map series (formerly DDP)</title>
      <link>https://community.esri.com/t5/python-questions/python-3-x-syntax-for-refreshing-a-map-series/m-p/455073#M35783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, this is &lt;STRONG&gt;very&lt;/STRONG&gt; frustrating! Refresh does not do what the ArcGIS documentation on Map Series for Pro says it should do. Even if I click the Refresh button in the ribbon, the dynamic labels update, but the map does not update its extent to the location specified by the index layer's updated definition query. I get the same results with the Python code. And, as you point out, Stephen, arcpy.mp doesn't have a zoom to selected features option. I tried zoomToAllLayers(), but it did exactly that -- zoomed to the full extent of every layer in the map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know how to look up bug reports to see if anyone has reported this to Esri?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2019 21:38:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-3-x-syntax-for-refreshing-a-map-series/m-p/455073#M35783</guid>
      <dc:creator>AmyRoust</dc:creator>
      <dc:date>2019-01-24T21:38:00Z</dc:date>
    </item>
  </channel>
</rss>

