arcpy插入图层到mxd中

import arcpy.mapping as mapping
mxd = mapping.MapDocument("CURRENT")
df = mapping.ListDataFrames(mxd, "Crime")[0]
refLayer = mapping.ListLayers(mxd, "Burglaries*", df)[0]
insertLayer = mapping.Layer(r"C:\ArcpyBook\data\CityOfSanAntonio.gdb\Crimes2009")
mapping.InsertLayer(df,refLayer,insertLayer,"BEFORE")

你可能感兴趣的:(arcpy)