Skip to content

Instantly share code, notes, and snippets.

@seaukara
Last active November 13, 2019 22:00
Show Gist options
  • Save seaukara/c1a823462a53bc02588023075d568a16 to your computer and use it in GitHub Desktop.
Save seaukara/c1a823462a53bc02588023075d568a16 to your computer and use it in GitHub Desktop.
import arcpy
from arcpy import da
import os
mxd = arcpy.mapping.MapDocument(r"")
fileLocation =(r"")
df = arcpy.mapping.ListDataFrames(mxd, "zzz")[0]
print 'Set Variables'
for lyr in arcpy.mapping.ListLayers(mxd, "", df):
lyr.visible = True
filename = (str(lyr))
arcpy.mapping.ExportToPDF(mxd, (fileLocation + os.sep + filename))
lyr.visible = False
print 'Finished'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment