<?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: Managing the state of Python Add-In extension in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/managing-the-state-of-python-add-in-extension/m-p/472285#M36883</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not really sure, but im pretty sure that in my code...my IDs align better...for example where you have:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: 13px;"&gt;class&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #2b91af; border: 0px; font-weight: inherit; font-size: 13px;"&gt;Extension&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;object&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;):

&lt;/SPAN&gt;&lt;/CODE&gt;and:

&lt;CODE&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; margin: 0px; padding: 0px;"&gt;extExtension&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; margin: 0px; padding: 0px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; margin: 0px; padding: 0px;"&gt;enabled &lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; margin: 0px; padding: 0px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; margin: 0px; padding: 0px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #101094; border: 0px; font-weight: inherit; margin: 0px; padding: 0px;"&gt;True&lt;/SPAN&gt;&lt;/CODE&gt;



In my code I have:

&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: 13px;"&gt;class&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt; ext&lt;/SPAN&gt;&lt;SPAN class="" style="color: #2b91af; border: 0px; font-weight: inherit; font-size: 13px;"&gt;Extension&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;object&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;):



&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; margin: 0px; padding: 0px;"&gt;extExtension&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; margin: 0px; padding: 0px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; margin: 0px; padding: 0px;"&gt;enabled &lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; margin: 0px; padding: 0px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; margin: 0px; padding: 0px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #101094; border: 0px; font-weight: inherit; margin: 0px; padding: 0px;"&gt;True&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 20:53:13 GMT</pubDate>
    <dc:creator>LukeWebb</dc:creator>
    <dc:date>2021-12-11T20:53:13Z</dc:date>
    <item>
      <title>Managing the state of Python Add-In extension</title>
      <link>https://community.esri.com/t5/python-questions/managing-the-state-of-python-add-in-extension/m-p/472284#M36882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #242729; background-color: rgba(248, 248, 248, 0.6); border: 0px; margin: 0px 0px 1em;"&gt;I have a python add-in that includes a toolbar and an extension. A button on the toolbar should turn extension on and off.&lt;/P&gt;&lt;P style="color: #242729; background-color: rgba(248, 248, 248, 0.6); border: 0px; margin: 0px 0px 1em;"&gt;A code for the button:&lt;/P&gt;&lt;PRE class="" style="color: #393318; border: 0px; font-size: 13px; margin: 0px 0px 1em; padding: 5px;"&gt;&lt;CODE style="border: 0px; font-size: 13px;"&gt;&lt;SPAN class="" style="color: #101094; border: 0px; font-size: 13px;"&gt;class&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #2b91af; border: 0px; font-size: 13px;"&gt;Switch&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;object&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;):&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #858c93; border: 0px; font-size: 13px;"&gt;# Implementation for Sample_addin.btnSwitch (Button)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #101094; border: 0px; font-size: 13px;"&gt;def&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt; __init__&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;self&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;):&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; self&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;enabled &lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #101094; border: 0px; font-size: 13px;"&gt;True&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; self&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;checked &lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #101094; border: 0px; font-size: 13px;"&gt;False&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #101094; border: 0px; font-size: 13px;"&gt;def&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt; onClick&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;self&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;):&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #101094; border: 0px; font-size: 13px;"&gt;if&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #101094; border: 0px; font-size: 13px;"&gt;not&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt; self&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;checked&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;checked &lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #101094; border: 0px; font-size: 13px;"&gt;True&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #101094; border: 0px; font-size: 13px;"&gt;print&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-size: 13px;"&gt;"Extension ON"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #858c93; border: 0px; font-size: 13px;"&gt;# extExtension.__init__()&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; extExtension&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;enabled &lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #101094; border: 0px; font-size: 13px;"&gt;True&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #101094; border: 0px; font-size: 13px;"&gt;else&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;checked &lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #101094; border: 0px; font-size: 13px;"&gt;False&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #101094; border: 0px; font-size: 13px;"&gt;print&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-size: 13px;"&gt;"Extension OFF"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; extExtension&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;enabled &lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #101094; border: 0px; font-size: 13px;"&gt;False&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P style="color: #242729; background-color: rgba(248, 248, 248, 0.6); border: 0px; margin: 0px 0px 1em;"&gt;A code for the extension:&lt;/P&gt;&lt;PRE class="" style="color: #393318; border: 0px; font-size: 13px; margin: 0px 0px 1em; padding: 5px;"&gt;&lt;CODE style="border: 0px; font-size: 13px;"&gt;&lt;SPAN class="" style="color: #101094; border: 0px; font-size: 13px;"&gt;class&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #2b91af; border: 0px; font-size: 13px;"&gt;Extension&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;object&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;):&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #858c93; border: 0px; font-size: 13px;"&gt;# Implementation for Sample_addin.extExtension (Extension)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #101094; border: 0px; font-size: 13px;"&gt;def&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt; __init__&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;self&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;):&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; self&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;enabled &lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #101094; border: 0px; font-size: 13px;"&gt;True&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #101094; border: 0px; font-size: 13px;"&gt;print&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-size: 13px;"&gt;'Initialized'&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #858c93; border: 0px; font-size: 13px;"&gt;# and so on...&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P style="color: #242729; background-color: rgba(248, 248, 248, 0.6); border: 0px; margin: 0px 0px 1em;"&gt;And a part of config.xml:&lt;/P&gt;&lt;PRE class="" style="color: #393318; border: 0px; font-size: 13px; margin: 0px 0px 1em; padding: 5px;"&gt;&lt;CODE style="border: 0px; font-size: 13px;"&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #2b91af; border: 0px; font-size: 13px;"&gt;Extension&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;&amp;nbsp; autoLoad&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-size: 13px;"&gt;"true"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; category&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-size: 13px;"&gt;"Tool"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #101094; border: 0px; font-size: 13px;"&gt;class&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-size: 13px;"&gt;"Extension"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; description&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-size: 13px;"&gt;"description"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-size: 13px;"&gt;"Sample_addin.extExtension"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-size: 13px;"&gt;"Extension"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; productName&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-size: 13px;"&gt;"Extension"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; showInExtensionDialog&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-size: 13px;"&gt;"true"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P style="color: #242729; background-color: rgba(248, 248, 248, 0.6); border: 0px; margin: 0px 0px 1em;"&gt;Everything seems to be OK. When I click the button, it freezes in 'checked' state and the extension gets marked in Extension dialog (Customize -&amp;gt; Extensions). But after this the extension doesn't start working (I have many functions in it like 'onCreate' and so on). If I toggle it manually in Extensions dialog - everything is OK, it works.&lt;/P&gt;&lt;P style="color: #242729; background-color: rgba(248, 248, 248, 0.6); border: 0px; margin: 0px 0px 1em;"&gt;And the raverse case - when the Extension works and I want to switch it off by clicking on the button, it only changes its state in Extensin dialog but not in reality.&lt;/P&gt;&lt;P style="color: #242729; background-color: rgba(248, 248, 248, 0.6); border: 0px; margin: 0px 0px 1em;"&gt;I've tried to reinitialize the extension by calling &lt;CODE style="border: 0px; font-size: 13px; padding: 1px 5px;"&gt;extExtension.__init__()&lt;/CODE&gt;. This gave me nothing (and no errors too, only this print statement).&lt;/P&gt;&lt;P style="color: #242729; background-color: rgba(248, 248, 248, 0.6); border: 0px; margin: 0px 0px 1em;"&gt;So... How to track the state of an extension in python add-in and change it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Nov 2016 14:14:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/managing-the-state-of-python-add-in-extension/m-p/472284#M36882</guid>
      <dc:creator>SergeyNorin1</dc:creator>
      <dc:date>2016-11-24T14:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: Managing the state of Python Add-In extension</title>
      <link>https://community.esri.com/t5/python-questions/managing-the-state-of-python-add-in-extension/m-p/472285#M36883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not really sure, but im pretty sure that in my code...my IDs align better...for example where you have:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: 13px;"&gt;class&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #2b91af; border: 0px; font-weight: inherit; font-size: 13px;"&gt;Extension&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;object&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;):

&lt;/SPAN&gt;&lt;/CODE&gt;and:

&lt;CODE&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; margin: 0px; padding: 0px;"&gt;extExtension&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; margin: 0px; padding: 0px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; margin: 0px; padding: 0px;"&gt;enabled &lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; margin: 0px; padding: 0px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; margin: 0px; padding: 0px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #101094; border: 0px; font-weight: inherit; margin: 0px; padding: 0px;"&gt;True&lt;/SPAN&gt;&lt;/CODE&gt;



In my code I have:

&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: 13px;"&gt;class&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt; ext&lt;/SPAN&gt;&lt;SPAN class="" style="color: #2b91af; border: 0px; font-weight: inherit; font-size: 13px;"&gt;Extension&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;object&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;):



&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; margin: 0px; padding: 0px;"&gt;extExtension&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; margin: 0px; padding: 0px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; margin: 0px; padding: 0px;"&gt;enabled &lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; margin: 0px; padding: 0px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; margin: 0px; padding: 0px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #101094; border: 0px; font-weight: inherit; margin: 0px; padding: 0px;"&gt;True&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:53:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/managing-the-state-of-python-add-in-extension/m-p/472285#M36883</guid>
      <dc:creator>LukeWebb</dc:creator>
      <dc:date>2021-12-11T20:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: Managing the state of Python Add-In extension</title>
      <link>https://community.esri.com/t5/python-questions/managing-the-state-of-python-add-in-extension/m-p/472286#M36884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 15px;"&gt;extExtension is a name of&amp;nbsp;an instance (from config.xml: class="Extension", ..., id&lt;SPAN class="" style="color: #303336; border: 0px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="border: 0px;"&gt;"Sample_addin.&lt;STRONG&gt;extExtension&lt;/STRONG&gt;")&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Nov 2016 06:21:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/managing-the-state-of-python-add-in-extension/m-p/472286#M36884</guid>
      <dc:creator>SergeyNorin1</dc:creator>
      <dc:date>2016-11-25T06:21:02Z</dc:date>
    </item>
  </channel>
</rss>

