HOW TO
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:
Article ID: 000011530
Get help from ArcGIS experts
Download the Esri Support App