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
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.