I found out that I can interact with a python add-in using the Geoprocessing > Python window by importing the add-in:
Is it possible to build this into the python add-in code so it automatically runs this line when ArcGIS starts and the add-in is initialized?
import MyAddinName_addin
Is it possible to build this into the python add-in code so it automatically runs this line when ArcGIS starts and the add-in is initialized?
Here is what I get:
>>> MyAddinName_addin
Runtime error
Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'MyAddinName_addin ' is not defined
Thanks for your help so far.
.NET based add-ins have a default behavior to delay loading where the assemblies associated with add-in buttons and tools are not loaded until the corresponding item on a toolbar or menu is clicked by the user. This behavior helps conserve application memory and other resources.
I've found that many, not all, but many of the .NET add-in behaviors and structure also seem to also apply to python add-ins.
Have you tried clicking on the toolbar or button to see if that loads the add-in into the environment and then using the python window to see if the methods appear?