Developing Arcgis Desktop Add-Ins Wpython
Developing Arcgis Desktop Add-Ins Wpython
Topics to cover
Tour of the documentation Supported add-in types The Python Add-In Wizard Building an add-in tool (demo) Building an add-in extension (demo)
No No No
Less
Buttons & Tools Toolbars Tool Pallets Combo Boxes Menus Extensions Dockable windows are not supported. No custom UI support.
Add-in Anatomy
XML file describes the type of customization(s) Python script contains the business logic
config.xml (metadata)
Images
Add-ins are built using the Python Add-in wizard The wizard generates fully stubbed out add-in projects including the config.xml, folders, and the Python script
-
Download the Python Wizard from arcgis.com Extract the contents of the .zip Launch the addin_assistant.exe from the bin folder
Guide book includes list of properties and functions for each add-in class
-
Debugging Add-Ins
Use the wizard to change add-in properties such as description, image, help, etc. After saving the changes, a new script is created. If you only need to update and add functionality to the existing script, there is no need to open the Python Add-In Wizard; just edit the Python script After updates, re-run makeaddin.py, install and test. Read the help topic Editing an add-in.
Sharing
A packaged compressed file (.esriaddin) containing the xml, Python script, images, & any necessary data makes add-ins easy to share Can be shared between users within an organization using a centralized network share or through email Can be easily uploaded to ArcGIS online or the resource centers Added to a system by simply copying them to a well-known folder and removed by deleting them from this folder
Localization
The translated config.xml files must reside at the root level in your add-in archive (.esriAddIn), and the files must adhere to one of the following naming conventions:
Default French French-France French-Canadian
Improve security The ESRISignAddIn.exe utility, supplied with the download of Python Add-In Wizard, can be used to sign ArcGIS for Desktop add-ins
-
Located in the bin folder Must be copied to your ArcGIS install bin folder
Most FAQs
Can I create and open custom dialog boxes within my add-in (using Tk, wxPython, etc.)?
-
No. The low-levels of integrating any Python UI framework with the event loop of the desktop apps is very difficult and currently doesnt work.
Yes & No. Although we continue adding more Python support where you can create scripts to automate mapping workflows and create add-ins to interact with the display and listen to events, full access to the ArcGIS system is not available within Python.
Yes. Using the pythonaddins module you can call the function GPToolDialog. This will open a GP tool.
Can I use the pythonaddins module outside an add-in such as in script tool?
-
No. This module is only for use within an add-in. However, it can be imported and used in the Python window. Using it inside a script tool will fail.
Thank-you!