Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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 = ""
                        wsPath = layer.workspacePath
                    if wsPath:
                        print "    " + layer.name + " : " + wsPath
share|improve this question

1 Answer 1

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 resources.esri.com) 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.