How to automate printing maps with the same extent but data changes over time

547
1
08-04-2017 11:49 AM
ChintamaniKandel1
New Contributor

I am looking for automating printing maps with the same extent but different data and theme. I have a map document with 10 layers and need to print 5 maps (2 layer in each map). I made a layer list (lists) and looking for printing maps with layer's symbology, title and layout. I have attached herewith my script. Thanks in advance. 

0 Kudos
1 Reply
ClintonDow1
Occasional Contributor II

You can use arcpy.mapping to add and remove layers from a MapDocument using the following code:

import arcpy
mxd = arcpy.mapping.MapDocument(r"C:\Project\Project.mxd")
df = arcpy.mapping.ListDataFrames(mxd, "New Data Frame")[0]
layer = arcpy.mapping.Layer(r"C:\Project\Data\Orthophoto.lyr")
arcpy.mapping.AddLayer(df, layer, "BOTTOM")
arcpy.mapping.RemoveLayer(df, layer)

So you can create an MXD that is a template (set extent, layout etc), add the relevant layers to it, then use arcpy.mapping.PrintMap() PrintMap—Help | ArcGIS Desktop, remove the layers, add the next set and so on.