Python Addins have a terrible, awful, no good debugging process.
Code > Build > Initialize Client App > Install > Test > Repeat.
Honestly, it wouldn't be so bad if ArcMap didn't take so long to initialize that I could grow a beard while waiting for it to get a license and load a blank document. Python Addins need a process to reload the addin module, and by reload I mean completely, including the config.xml and image files from the assembly cache.
If this were possible, we could change the debugging process to:
Code > Build > Reload > Test
Why would we not want to do that? Additionally, if we could manipulate the config.xml and reload, that would bring new functionality to the table, including the ability to create semi-dynamic GUIs that could change based on a set of conditions, such as changing the image asset used for a button based on a specific condition.
John Dye , fwiw, I find the fastest way to refresh addins when developing (i.e. after a .updating a .py) without having to close/open Catalog/Map is to
That loads the update addin without having to close the ArcGIS Desktop session which saves a lot of time. And it at least remembers this path if you are editing the same addin over and over. So not a wonderful solution, but as often as I "repeat" when working on addins, saving 15-60+ seconds each time reduces my frustration.
If there was a way to create a button that enters the Customize Mode and loads from a file, that would make this process work, but I don't know if that is possible.
Thank you for your suggestion! Unfortunately, Python add-ins are no longer supported in ArcGIS Pro, and development on ArcMap has ended. There are no plans to support Python add-ins in ArcGIS Pro due to reasons outline in a statement provided for a previous idea when it was closed. To create add-ins in ArcGIS Pro, we provide the more powerful and flexible ArcGIS Pro SDK for .NET.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.