<?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: Need to wait for map to draw before changing extent via ArcPy in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/need-to-wait-for-map-to-draw-before-changing/m-p/672506#M29805</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could import the time module and introduce delays between map extents with time.sleep()&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Oct 2020 17:04:53 GMT</pubDate>
    <dc:creator>DonShawEsri</dc:creator>
    <dc:date>2020-10-09T17:04:53Z</dc:date>
    <item>
      <title>Need to wait for map to draw before changing extent via ArcPy</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/need-to-wait-for-map-to-draw-before-changing/m-p/672505#M29804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a simple Python script that iterates between map extents:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aprx = arcpy.mp.ArcGISProject("CURRENT")&lt;BR /&gt;lyt = aprx.listLayouts("Layout")[0]&lt;BR /&gt;mf = lyt.listElements("MAPFRAME_ELEMENT", "Map*")[0]&lt;/P&gt;&lt;P&gt;mf.camera.setExtent(arcpy.Extent(330611.83,5553892.48,330863.45,5554011.54))&lt;BR /&gt;mf.camera.setExtent(arcpy.Extent(330048.80,5553500.43,332061.75,5554452.93))&lt;BR /&gt;mf.camera.setExtent(arcpy.Extent(323271.40,5544979.88,331323.22,5548789.89))&lt;BR /&gt;mf.camera.setExtent(arcpy.Extent(326568.38,5548818.46,327071.62,5549056.59))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It appears the map extent changes but does not wait for the map to draw completely before going to the next extent. Any idea how to force the setExtent to wait for the map to draw?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Oct 2020 16:35:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/need-to-wait-for-map-to-draw-before-changing/m-p/672505#M29804</guid>
      <dc:creator>Lake_Country_GIS</dc:creator>
      <dc:date>2020-10-09T16:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: Need to wait for map to draw before changing extent via ArcPy</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/need-to-wait-for-map-to-draw-before-changing/m-p/672506#M29805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could import the time module and introduce delays between map extents with time.sleep()&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Oct 2020 17:04:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/need-to-wait-for-map-to-draw-before-changing/m-p/672506#M29805</guid>
      <dc:creator>DonShawEsri</dc:creator>
      <dc:date>2020-10-09T17:04:53Z</dc:date>
    </item>
  </channel>
</rss>

