Updating the properties of layout elements

Each layout element has a set of properties that you can update programmatically. For example, LegendElement includes properties that allow you to change the position of the legend on the page, update the legend title, and access legend items.

Getting ready

There are many different types of layout elements, including graphics, legends, text, maps, and pictures. Each of these elements is represented by a class in the arcpy.mapping package. These classes provide various properties that you can use to programmatically alter the element.

The DataFrame class provides access to the data frame properties in the map document file. This object can work with both map units and page layout units, depending on the property ...

Get Programming ArcGIS with Python Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.