Solved! Go to Solution.
You should be able to run this script from idle. Just substitute the path to your mxd. You might have to tweak this some if the mxd has multiple data frames or grouped layers
from arcpy import mapping
mapDoc = r'enter mxd file path here'
mxd = mapping.MapDocument(mapDoc)
lyrs = mapping.ListLayers(mxd)
lyrTitle = 'Map Layer'
sourceTitle = 'Data Source'
print('%-60s%s' % (lyrTitle,sourceTitle))
print('%-60s%s' % ('-' * len(lyrTitle), '-' * len(sourceTitle)))
for lyr in lyrs:
try:
print('%-60s%s' % (lyr.name,lyr.dataSource))
except:
print('Unable to retrieve layer information')
del mxd
You should be able to run this script from idle. Just substitute the path to your mxd. You might have to tweak this some if the mxd has multiple data frames or grouped layers
from arcpy import mapping
mapDoc = r'enter mxd file path here'
mxd = mapping.MapDocument(mapDoc)
lyrs = mapping.ListLayers(mxd)
lyrTitle = 'Map Layer'
sourceTitle = 'Data Source'
print('%-60s%s' % (lyrTitle,sourceTitle))
print('%-60s%s' % ('-' * len(lyrTitle), '-' * len(sourceTitle)))
for lyr in lyrs:
try:
print('%-60s%s' % (lyr.name,lyr.dataSource))
except:
print('Unable to retrieve layer information')
del mxd