Solved! Go to Solution.
mxd = arcpy.mapping.MapDocument(r"C:\Maps\MakeMaps.mxd") df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0] #df name is "Layers" in this example for lyr in arcpy.mapping.ListLayers(mxd): lyr.visible = True ext = lyr.getExtent() df.extent = ext arcpy.mapping.ExportToPNG(mxd, r"C:\Maps\Exports\" + lyr + ".png")
mxd = arcpy.mapping.MapDocument(r"C:\Maps\MakeMaps.mxd") df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0] #df name is "Layers" in this example for lyr in arcpy.mapping.ListLayers(mxd): lyr.visible = True ext = lyr.getExtent() df.extent = ext arcpy.mapping.ExportToPNG(mxd, r"C:\Maps\Exports\" + lyr + ".png")
Use export to png:
http://resources.arcgis.com/en/help/main/10.1/index.html#//00s30000002s000000
this thread will help you, be sure and read the last thread:
http://forums.arcgis.com/threads/17136-Turn-layers-off-w-arcpy.mapping
You will also need to set the extent inside the loop (you will need to save and close the mxd with all layers turned off):
I have not tested this so you might have to tinker with it.mxd = arcpy.mapping.MapDocument(r"C:\Maps\MakeMaps.mxd") df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0] #df name is "Layers" in this example for lyr in arcpy.mapping.ListLayers(mxd): lyr.visible = True ext = lyr.getExtent() df.extent = ext arcpy.mapping.ExportToPNG(mxd, r"C:\Maps\Exports\" + lyr + ".png")