import arcpy mxd = arcpy.mapping.MapDocument(r"FILENAME") for lyr in arcpy.mapping.ListLayers(mxd): if lyr.supports("DATASOURCE"): print "Layer: " + lyr.name + " Source: " + lyr.dataSource
import arcpy mxd = arcpy.mapping.MapDocument(r"c:\workDir\FILENAME.mxd") dfList = arcpy.mapping.ListDataFrames(mxd) for df in dfList: lyrList = arcpy.mapping.ListLayers(mxd, "", df): print "Data Frame: ", df.name for lyr in lyrList: if lyr.supports("DATASOURCE"): source = lyr.dataSource else: source = "undefined" print "Layer: " + lyr.name + " Source: " + source
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.