<?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: refreshing text element in python in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/refreshing-text-element-in-python/m-p/590439#M46292</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;mxd.save()&lt;/P&gt;&lt;P&gt;look closely ..​&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Apr 2015 23:53:17 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2015-04-21T23:53:17Z</dc:date>
    <item>
      <title>refreshing text element in python</title>
      <link>https://community.esri.com/t5/python-questions/refreshing-text-element-in-python/m-p/590438#M46291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am sorry for asking I am sure someone has asked this but I can't seem to find the answer and i am new enough to arcmap and python I can't see my issue..... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I am wanting to run a loop that changes a text element prior to being exported to .PNG&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;hourdriver = range(2)
for step in hourdriver:
&amp;nbsp;&amp;nbsp;&amp;nbsp; for elm in arcpy.mapping.ListLayoutElements(mxd, "TEXT_ELEMENT"):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if elm.name == "TIME_DESC":
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Found it"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elm.text = "New Text"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print elm.text # This results in "New Text" but on the map it stays as "TIME" which was the original text

mxd.save # I have tried save and refreshactiveiew at several points in the loop with no real result. 
arcpy.RefreshActiveView()
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my print statements returns the correct text but the text element in the map does not update. as you can see i have tried saving and refreshing the active view.....&amp;nbsp; here is the print out put that I get&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Found it
New Text
Found it
New Text&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was thinking about clone and delete but that seems like a strange way to go about refreshing a text element. Any help would be appreciated i am sure it is something simple i am missing. Thank you for your time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 01:21:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/refreshing-text-element-in-python/m-p/590438#M46291</guid>
      <dc:creator>KendrickSchuett</dc:creator>
      <dc:date>2021-12-12T01:21:30Z</dc:date>
    </item>
    <item>
      <title>Re: refreshing text element in python</title>
      <link>https://community.esri.com/t5/python-questions/refreshing-text-element-in-python/m-p/590439#M46292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;mxd.save()&lt;/P&gt;&lt;P&gt;look closely ..​&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Apr 2015 23:53:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/refreshing-text-element-in-python/m-p/590439#M46292</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-04-21T23:53:17Z</dc:date>
    </item>
    <item>
      <title>Re: refreshing text element in python</title>
      <link>https://community.esri.com/t5/python-questions/refreshing-text-element-in-python/m-p/590440#M46293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DOH..... sorry i came from vb and i am lazy when i deal with stuff beacuse i am used to VS doing stuff for me. Thanks again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2015 18:32:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/refreshing-text-element-in-python/m-p/590440#M46293</guid>
      <dc:creator>KendrickSchuett</dc:creator>
      <dc:date>2015-04-22T18:32:11Z</dc:date>
    </item>
  </channel>
</rss>

