In this chapter, we will cover the following recipes:
Creating a list of layout elements
Assigning a unique name to layout elements
Restricting the layout elements returned by ListLayoutElements()
Updating the properties of layout elements
Getting a list of available printers
Printing maps with PrintMap()
Exporting a map to a PDF file
Exporting a map to an image file
Exporting a report
Building a map book with Data Driven Pages and ArcPy mapping
Publishing a map document to an ArcGIS Server service
Introduction
The arcpy.mapping module, released with ArcGIS 10, provides a number of capabilities related to the automation of map production. The arcpy.mapping module can be used to automate map production, build map books, export maps to image or PDF files, and create and manage PDF files. In this chapter, you'll learn how to use the arcpy.mapping module to automate various geoprocessing tasks related to map production and printing.