When starting to use the ArcPy site-package of ArcGIS Desktop within Python scripting, it is important to understand the workflow for writing and configuring Python AddIns.
This course, which is suitable for English-speaking students from anywhere in the world, was recorded using ArcGIS 10.3.1 for Desktop but should be equally applicable to versions 10.1, 10.2, 10.4 and 10.5. It is not suitable for ArcGIS Desktop 10.0 and earlier versions because Python AddIns only became available at 10.1. ArcGIS for Desktop licensing is not included, but can be obtained for non-commercial purposes from Esri and its International Distributors under the.
All necessary data is downloaded from Natural Earth, and solutions to the exercises are available as attachments to download.
In this 89 minute course of 12 videos you will learn how to:
The first lecture gives an overview of the topics and exercises which will be covered during the remaining lectures of the course. It also gives an overview of the ArcGIS Desktop and Python versions that are used during the presentations, and some tips about using Notepad++ for XML editing. It then gives an overview about downloading the course data from Natural Earth.
This lecture will assist you to determine whether you are using suitable versions of ArcGIS Desktop (10.1-10.5) and Python (2.7.x) for the course. It also suggests that you use Notepad++ for XML editing. If you are already comfortable that you are using suitable software then this lecture can be considered optional.
This lecture will assist you to download the Natural Earth data required for this course (and which can also be used in other courses by the same instructor). If you are already familiar with Natural Earth data and want to take the shortcut of simply copying ne_10m_admin_0_countries.shp (and its accompanying files) into a folder named C:\polygeo then this lecture can be considered optional.
In this lecture you will learn where to find and how to use the Python AddIn Wizard to create a Python AddIn project with a toolbar and initially one button which can be used to zoom the map to the extent of the country of Turkey.
In this lecture you will learn how to clone the Zoom To Turkey button, via Python and XML editing, to create another button which zooms to a different country.
We deliberately break our Python AddIn in a number of ways, so that you can learn what to look for when a Python AddIn does not work as expected.
In this lecture you learn how to make a second Python AddIn that consists of:
In this lecture we will create a third Python Addin to assist us to become familiar with the remaining types of Python Addins that we can include in our projects. This generic addin is given menus (and sub-menus), buttons, tools, a tool palette and a combo box.
In this lecture we will first edit XML to provide tool names of Select Circle, Select Line, Select Rectangle and Toggle Countries to the four tools on our tool palette.
Then we edit Python code to enable the first three tools to drag out a circle, draw a line or drag out a rectangle on your map so that the names of any countries under the graphics drawn can be popped up into an alphabetical list.
The fourth tool is configured to enable you to toggle the countries of the world layer on/off with a double-click anywhere on the map.
In this lecture we edit XML and then Python code to configure the combo box so that it provides you a pick list of the countries of the world from which you can choose one to zoom to.
The final lecture exposes you to some more options within the config.xml file that you can use to place menus on toolbars, and write tips that will appear when you hover over items on the toolbar, to assist the users of your Python AddIns to understand the functionality that they offer.
Graeme provides training, consulting and support in: ArcGIS Desktop, ArcGIS Pro, ArcPy/Python, ModelBuilder/Geoprocessing, ArcGIS Online, Story Maps and Family HiStory Mapping.
He has been using Esri software intensively for over 25 years (18 of those with Esri International Distributors in the United Kingdom and Australia), and always installs the latest versions of the ArcGIS platform as soon as they are released (and often sooner!).