<?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: Toggle Text Element Visibility in ArcGIS Pro in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/toggle-text-element-visibility-in-arcgis-pro/m-p/721542#M55872</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I've run the code, saved, closed, and restarted. Still doesn't turn off the element.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Feb 2020 16:14:08 GMT</pubDate>
    <dc:creator>KateBerg2</dc:creator>
    <dc:date>2020-02-25T16:14:08Z</dc:date>
    <item>
      <title>Toggle Text Element Visibility in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/python-questions/toggle-text-element-visibility-in-arcgis-pro/m-p/721540#M55870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class=""&gt;I'm trying to turn off visibility of a text element called "Draft" on 20 layouts in in an aprx. The script runs without errors, but the element doesn't get turned off on any of the pages.&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy
aprx &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mp&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ArcGISProject&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;r&lt;SPAN class="string token"&gt;"C:\Users\kberg\Documents\DataGapEvaluation.aprx"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; lyt &lt;SPAN class="keyword token"&gt;in&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="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; elm &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; lyt&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;listElements&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'TEXT_ELEMENT'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; elm&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;text &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Draft"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
            elm&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;visible &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token boolean"&gt;False&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍
aprx&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;save&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;del&lt;/SPAN&gt; aprx&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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 06:51:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/toggle-text-element-visibility-in-arcgis-pro/m-p/721540#M55870</guid>
      <dc:creator>KateBerg2</dc:creator>
      <dc:date>2021-12-12T06:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: Toggle Text Element Visibility in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/python-questions/toggle-text-element-visibility-in-arcgis-pro/m-p/721541#M55871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;do you save the aprx?&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/arcpy/mapping/textelement-class.htm" title="https://pro.arcgis.com/en/pro-app/arcpy/mapping/textelement-class.htm"&gt;TextElement—ArcPy | Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or are you hoping this does it interactively with the project open?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Feb 2020 16:09:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/toggle-text-element-visibility-in-arcgis-pro/m-p/721541#M55871</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2020-02-25T16:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: Toggle Text Element Visibility in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/python-questions/toggle-text-element-visibility-in-arcgis-pro/m-p/721542#M55872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I've run the code, saved, closed, and restarted. Still doesn't turn off the element.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Feb 2020 16:14:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/toggle-text-element-visibility-in-arcgis-pro/m-p/721542#M55872</guid>
      <dc:creator>KateBerg2</dc:creator>
      <dc:date>2020-02-25T16:14:08Z</dc:date>
    </item>
    <item>
      <title>Re: Toggle Text Element Visibility in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/python-questions/toggle-text-element-visibility-in-arcgis-pro/m-p/721543#M55873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It was saving in the code I was referring to.&amp;nbsp; That seems to be the case in the code samples in the links.&amp;nbsp; And if you have Pro open when you are using your code, you should be using "CURRENT" rather than a path to the aprx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Feb 2020 18:07:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/toggle-text-element-visibility-in-arcgis-pro/m-p/721543#M55873</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2020-02-25T18:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: Toggle Text Element Visibility in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/python-questions/toggle-text-element-visibility-in-arcgis-pro/m-p/721544#M55874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something must've been acting weird with referring to the path vs. "CURRENT". Changing that fixed it. Thanks, &lt;A href="https://community.esri.com/migrated-users/3116" target="_blank"&gt;Dan Patterson&lt;/A&gt;‌!&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy
aprx &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mp&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ArcGISProject&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"CURRENT"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; lyt &lt;SPAN class="keyword token"&gt;in&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="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; elm &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; lyt&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;listElements&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'TEXT_ELEMENT'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; elm&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;text &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"DRAFT"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
            elm&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;visible &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token boolean"&gt;False&lt;/SPAN&gt;
aprx&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;save&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;del&lt;/SPAN&gt; aprx‍‍‍‍‍‍‍‍&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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 06:51:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/toggle-text-element-visibility-in-arcgis-pro/m-p/721544#M55874</guid>
      <dc:creator>KateBerg2</dc:creator>
      <dc:date>2021-12-12T06:51:57Z</dc:date>
    </item>
  </channel>
</rss>

