<?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 Refresh Active View Automatically in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/refresh-active-view-automatically/m-p/57076#M4516</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to work out how to have the arcmap active view refresh every few minutes or so automatically. This is so I can track the movement of some ships. At this stage it is to prove a concept. I know there is the arcpy.RefreshActiveView function, but I need it automatically plus the time frame. Any ideas? This is for Version 10&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Jan 2013 21:47:32 GMT</pubDate>
    <dc:creator>PoMGIS</dc:creator>
    <dc:date>2013-01-09T21:47:32Z</dc:date>
    <item>
      <title>Refresh Active View Automatically</title>
      <link>https://community.esri.com/t5/python-questions/refresh-active-view-automatically/m-p/57076#M4516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to work out how to have the arcmap active view refresh every few minutes or so automatically. This is so I can track the movement of some ships. At this stage it is to prove a concept. I know there is the arcpy.RefreshActiveView function, but I need it automatically plus the time frame. Any ideas? This is for Version 10&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2013 21:47:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/refresh-active-view-automatically/m-p/57076#M4516</guid>
      <dc:creator>PoMGIS</dc:creator>
      <dc:date>2013-01-09T21:47:32Z</dc:date>
    </item>
    <item>
      <title>Re: Refresh Active View Automatically</title>
      <link>https://community.esri.com/t5/python-questions/refresh-active-view-automatically/m-p/57077#M4517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I am trying to work out how to have the arcmap active view refresh every few minutes or so automatically. This is so I can track the movement of some ships. At this stage it is to prove a concept. I know there is the arcpy.RefreshActiveView function, but I need it automatically plus the time frame. Any ideas? This is for Version 10&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, you should be able to do this with the sleep() function from the time module.&amp;nbsp; However, you won't be able to do much interaction with the map.&amp;nbsp; But, if you just want to watch ships move around, perhaps something like this might do the trick (in PythonWin in ArcMap of course):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;gt;&amp;gt;&amp;gt; import arcpy
&amp;gt;&amp;gt;&amp;gt; from arcpy import mapping as m 
&amp;gt;&amp;gt;&amp;gt; from time import sleep
&amp;gt;&amp;gt;&amp;gt; mxd = m.MapDocument('CURRENT')
&amp;gt;&amp;gt;&amp;gt; df = m.ListDataFrames(mxd, "Layers")[0]
&amp;gt;&amp;gt;&amp;gt; count = 0
&amp;gt;&amp;gt;&amp;gt; while count &amp;lt; 5:
...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sleep(5)
...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.RefreshActiveView()
...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; count +=1
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is just a simple test.&amp;nbsp; Inside the sleep() function you can list how many seconds you want it to wait.&amp;nbsp; You can set this for longer and have it loop however you want.&amp;nbsp; I just did that simple while loop as a test.&amp;nbsp; Although, I am not 100% sure this will work but it is the only thing I can think of.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:10:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/refresh-active-view-automatically/m-p/57077#M4517</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-10T22:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: Refresh Active View Automatically</title>
      <link>https://community.esri.com/t5/python-questions/refresh-active-view-automatically/m-p/57078#M4518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for that Caleb. I will give it a go. I appreciate the quick response.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2013 22:29:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/refresh-active-view-automatically/m-p/57078#M4518</guid>
      <dc:creator>PoMGIS</dc:creator>
      <dc:date>2013-01-09T22:29:29Z</dc:date>
    </item>
  </channel>
</rss>

