Book Image

Programming ArcGIS with Python Cookbook, Second Edition

By : Eric Pimpler
Book Image

Programming ArcGIS with Python Cookbook, Second Edition

By: Eric Pimpler

Overview of this book

The book kicks off with the fundamentals of starting to use Python with ArcGIS, followed by recipes on managing map documents and layers, including how to find and fix broken data links in these files. In the second part of the book, you will learn to create custom geoprocessing tools and how to use the Attribute and Location tools to select specific features. The third part of the book covers topics for advanced users including the REST API, and also teaches you how to use Python with ArcGIS Pro. The book finishes with appendices covering how to automate Python scripts, and the five things that should be at the back of every GIS programmer's mind.
Table of Contents (17 chapters)
16
Index

Installing and testing an add-in

You'll want to test add-ins before distributing them to your end users. To test these, you first need to install the add-in.

Getting ready

In the working folder of your add-in, the makeaddin.py script can be used to copy all files and folders to a compressed add-in folder in a working directory with the <working folder name>.esriaddin file format. Double-click on this .esriaddin file to launch the Esri ArcGIS add-in installation utility, which will install your add-in. You can then go into ArcGIS for Desktop and test the add-in. The custom toolbar or menu may already be visible and ready to test. If it is not visible, go to the Customize menu and click on Add-in Manager. The Add-In Manager dialog box lists the installed add-ins that target the current application. Add-in information, such as name, description, and image, which are entered as project settings, should be displayed.

How to do it…

  1. Inside the main folder for your add-in, there will...