Problems with event handlers not firing in python add in extensions

808
1
08-11-2017 07:22 AM
DarrenSmith5
New Contributor

Hi,

I'm having all sorts of trouble getting Python Add-In extensions working in ArcGIS Desktop 10.5 (Win10). Basically, my problem is that event handlers do not fire. The only way I can get the extension to be activated is to open the Extensions dialog, which fires the __init__ event handler (without even clicking on the extension to turn it on!). The extension is configured to be automatically enabled. But then, having manually clicked on the extension to enable it, if I close ArcMap and re-open then no events fire, even if the extension is shown as being on in the Extensions dialog. The only way to bring it back to life is to turn it off, close the dialog and then re-open the dialog and turn it on again. Is anyone else having these kind of issues with Extensions? Did anyone find the secret handshake to make things work? First, I was trying this with my own code, but then I tried the ESRI example, which gave the same behaviour.

Cheers,

Darren

0 Kudos
1 Reply
NobbirAhmed
Esri Regular Contributor

Hi Darren, sorry to inform you that this issue started showing up after 10.4 and resolved in 10.5.1 Most of the time your workaround works:

"The only way I can get the extension to be activated is to open the Extensions dialog, which fires the __init__ event handler (without even clicking on the extension to turn it on!)."

0 Kudos