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 being used. Page layout properties, such as positioning and sizing, can be applied to the properties, including elementPositionX
, elementPositionY
, elementWidth
, and elementHeight
.
The GraphicElement
object is a generic object for various graphics...