GEOG 485:
GIS Programming and Software Development

4.8 Limitations of Python scripting with ArcGIS

PrintPrint

In this course, you've learned the basics of programming and have seen how Python can automate any GIS function that can be performed with the ArcGIS toolboxes. There's a lot of power available to you through scripting, and hopefully, you're starting to get ideas about how you can apply that in your work outside this course.

To conclude this lesson, however, it's important to talk about what's not available through Python scripting in ArcGIS.

Limits with fine-grained access to the "guts" of ArcGIS

Python interaction with ArcGIS is mainly limited to reading and writing data, editing the properties of project files, and running the tools that are included with ArcGIS. Although the ArcGIS tools are useful, they are somewhat black box, meaning you put things in and get things out without knowing or being concerned about what is happening inside. In ArcGIS Desktop, the ArcObjects SDK could be used to gain access to "the building blocks" of the software, providing a greater degree of control over the tools being developed.  And a product called ArcGIS Engine made it possible to develop stand-alone applications that provide narrowly tailored functionality.  Working with ArcObjects/ArcGIS Engine required coding in a non-Python language, such as Visual Basic .NET or C# .NET.  

In the transition to ArcGIS Pro, the same access to the fine-grained building blocks does not (yet?) exist.  However, developers can extend/customize the Pro user interface using the Pro SDK and can develop stand-alone apps using the ArcGIS Runtime SDKs.  As with the Desktop ArcObjects and ArcGIS Engine products, the Pro SDK and Runtime SDKs require coding with a language other than Python.

Limits with user interface customization

In this course, we have done nothing with customizing Pro to add special buttons, toolbars, and so on that trigger our programs. Our foray into user interface design has been limited to making a script tool and toolbox. Although script tools are useful, there are times when you want to take the functionality out of the toolbox and put it directly into Pro as a button on a toolbar. You may want that button to launch a new window with text boxes, labels, and buttons that you design yourself.

This is one place that capabilities have taken a step backward (so far?) in the development of Pro.  In ArcGIS Desktop (starting at 10.1), Python developers could create such UI customizations relatively easily by developing what Esri called "Python add-ins."  Unfortunately, such easy-to-develop add-ins for Pro cannot be developed with Python.  Development of custom Pro interfaces can be done with Python GUI toolkits, a topic covered in our Advanced Python class (GEOG 489).  Such customization can also be accomplished with the Pro SDK.  Both of these pathways are recommended for folks who've done very well in this class and/or already have strong programming experience.

If you still utilize ArcGIS Desktop at work and are interested in the idea of developing "easy" Python add-ins, you should check out the ArcGIS Desktop Python add-ins topic in the Desktop Help system.  (And rest assured that Python scripting for Desktop is very similar to the scripting you've done in this course for Pro.)