Is This Content Helpful?
How can we make this better? Please provide as much detail as possible.
The instructions below describe the steps to use Python code to list the data source for each layer in an MXD’s table of contents.
import arcpy mxd = arcpy.mapping.MapDocument("CURRENT") for lyr in arcpy.mapping.ListLayers(mxd): if lyr.supports("DATASOURCE"): print "Layer: " + lyr.name + " Source: " + lyr.dataSourceExample: