Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:

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 = ""
                        wsPath = layer.workspacePath
                    if wsPath:
                        print "    " + + " : " + wsPath
share|improve this question
up vote 2 down vote accepted

I don't think it is possible to do this at 10.0 but in the What's New at 10.1 PDF (which is available via two new properties on the Layer class of arcpy.mapping are described:

▪ maxScale—Provides the ability to set or get the layer's maximum scale threshold.

▪ minScale—Provides the ability to set or get the layer's minimum scale threshold.

share|improve this answer
Looks like ESRI is slowly getting there... Thanks for the link :-) – Andy Arismendi Apr 16 '12 at 16:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.