.scale
df.scale = 2000
import arcpy import os from arcpy import env mxd = arcpy.mapping.MapDocument(r"I:\GIS_Workspace\Output\test.mxd") df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0] lyrs=arcpy.mapping.ListLayers(mxd, "*", df) #Turn off "Sections" and "MGT" layers: for lyr in lyrs: if lyr.name in ["GRP_SAV_1-0"]: lyr.visible=False #Loop through layers (and bookmarks) to export PDFs for lyr in lyrs: if lyr.name in ["Sections", "MGT"]: lyr.visible=True #Turn on layer for bkmk in [bkmk for bkmk in arcpy.mapping.ListBookmarks(mxd,"*",df) if bkmk.name in ["North","Middle"]]: df.extent = bkmk.extent df.referenceScale=1500 outFile = r"I:\GIS_Workspace\Output\\" + bkmk.name + ".pdf" arcpy.RefreshActiveView() arcpy.mapping.ExportToPDF(mxd, outFile, df, picture_symbol="VECTORIZE_BITMAP",layers_attributes="LAYERS_AND_ATTRIBUTES")
for bkmk in [bkmk for bkmk in arcpy.mapping.ListBookmarks(mxd,"*",df) if bkmk.name in ["North","Middle"]]: df.extent = bkmk.extent df.referenceScale=df.scale/4 outFile = r"I:\GIS_Workspace\Output\\" + bkmk.name + ".pdf" arcpy.RefreshActiveView() #this line can often help arcpy.mapping.ExportToPDF(mxd, outFile, resolution=900,picture_symbol="VECTORIZE_BITMAP",layers_attributes="LAYERS_AND_ATTRIBUTES")
Hello Danny,I was playing with the reference scale (manually in ArcMap) and made these three maps (with made up data). Is this the kind of thing you're looking for?[ATTACH=CONFIG]31907[/ATTACH][ATTACH=CONFIG]31905[/ATTACH][ATTACH=CONFIG]31906[/ATTACH]
Hello Danny,I don't know if I've done that before. Sounds interesting though. Maybe you could play with df.referenceScale. Let me know if it works!
Hello Danny,I'd try playing with the export to pdf settings (see here). You should be able to make a really high resolution pdf and then be able to zoom in and look around (on the pdf). I'd also try using the layers_attributes setting so you can turn on and off layers in the pdf. The picture_symbol setting can keep your vector data as vectors in the pdf so you can theoretically zoom in infinitely!arcpy.ExportToPDF(map_document, out_pdf,resolution=900,picture_symbol="VECTORIZE_BITMAP",layers_attributes="LAYERS_AND_ATTRIBUTES")Let me know if that's what you're looking for!
arcpy.ExportToPDF(map_document, out_pdf,resolution=900,picture_symbol="VECTORIZE_BITMAP",layers_attributes="LAYERS_AND_ATTRIBUTES")
for bkmk in [bkmk for bkmk in arcpy.mapping.ListBookmarks(mxd,"*",df) if bkmk.name in ["North","Middle"]]: df.extent = bkmk.extent #df.scale *= 1.5 #df.scale = 2000 # ex 12000 = 1:2,000 outFile = r"I:\GIS_Workspace\Output\\" + bkmk.name + ".pdf" arcpy.mapping.ExportToPDF(mxd, outFile, resolution=900,picture_symbol="VECTORIZE_BITMAP",layers_attributes="LAYERS_AND_ATTRIBUTES")
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.