1. 程式人生 > >arcpy圖層相關操作

arcpy圖層相關操作

import arcpy
import os
def main():
    mxd = arcpy.mapping.MapDocument('current')  #獲取當前開啟MXD
    df = arcpy.mapping.ListDataFrames(mxd, "圖層")[0]  #獲取全部圖層組
   lyr= arcpy.mapping.ListLayers(mxd,"",df): #獲取圖層組全部圖層