I'd like to generate a report about MXD layers for a handful of MXDs. I want the report to display their name, workspace path and scale range settings.
I can get the first two with ArcPy but I didn't find a way to get the scale ranges. Can this be done with ArcPy? Or perhaps there's some other way to generate the type of report I'm looking for?
I found this but it doesn't give me scale range info: http://resources.arcgis.com/gallery/file/geoprocessing/details?entryID=A910AB18-1422-2418-3418-3885D388EF60
Here's the code I've started with:
import os, arcpy
directory = r"D:\MapTemplates\Map_Templates"
for root, dirs, files in os.walk(directory):
for myFile in files:
fileExt = os.path.splitext(myFile)[1]
if (fileExt == ".mxd"):
fullPath = os.path.join(root, myFile)
print myFile
myMap = arcpy.mapping.MapDocument(fullPath)
layers = arcpy.mapping.ListLayers(myMap)
for layer in layers:
wsPath = ""
try:
wsPath = layer.workspacePath
except:
pass
if wsPath:
print " " + layer.name + " : " + wsPath