<?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: Controlling State with Python Add-In in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/controlling-state-with-python-add-in/m-p/363914#M28792</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Karl,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is the ID of the button associated with ButtonClass2 also called ButtonClass2 or is it just the class name. In the config file you will find the id, it should be something like MyAddin.button2. As the help topic says you don't need to provide the namespace, so it would just be button2.enabled = False.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Feb 2013 21:53:33 GMT</pubDate>
    <dc:creator>ChrisFox3</dc:creator>
    <dc:date>2013-02-28T21:53:33Z</dc:date>
    <item>
      <title>Controlling State with Python Add-In</title>
      <link>https://community.esri.com/t5/python-questions/controlling-state-with-python-add-in/m-p/363913#M28791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to control the state of one button using another and nothing I have tried so far has worked. This is what should work. Any suggestions?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
import pythonaddins

class ButtonClass1(object):
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; def __init__(self):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.enabled = True
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.checked = False
&amp;nbsp;&amp;nbsp;&amp;nbsp; def onClick(self):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ButtonClass2.enabled = False
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pass

class ButtonClass2(object):
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; def __init__(self):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.enabled = True
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.checked = False
&amp;nbsp;&amp;nbsp;&amp;nbsp; def onClick(self):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pass&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What is the point of having these properties if you cannot set and reset them?&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#/Managing_the_state_of_Python_add_in_types/014p0000001s000000/" rel="nofollow noopener noreferrer" target="_blank"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#/Managing_the_state_of_Python_add_in_types/014p0000001s000000/&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:57:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/controlling-state-with-python-add-in/m-p/363913#M28791</guid>
      <dc:creator>KarlHillstrom</dc:creator>
      <dc:date>2021-12-11T16:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: Controlling State with Python Add-In</title>
      <link>https://community.esri.com/t5/python-questions/controlling-state-with-python-add-in/m-p/363914#M28792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Karl,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is the ID of the button associated with ButtonClass2 also called ButtonClass2 or is it just the class name. In the config file you will find the id, it should be something like MyAddin.button2. As the help topic says you don't need to provide the namespace, so it would just be button2.enabled = False.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 21:53:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/controlling-state-with-python-add-in/m-p/363914#M28792</guid>
      <dc:creator>ChrisFox3</dc:creator>
      <dc:date>2013-02-28T21:53:33Z</dc:date>
    </item>
  </channel>
</rss>

