import arcpy import os def main(): mxd = arcpy.mapping.MapDocument('current') #获取当前打开MXD df = arcpy.mapping.ListDataFrames(mxd, "图层")[0] #获取全部图层组 lyr= arcpy.mapping.ListLayers(mxd,"",df): #获取图层组全部图层