script添加数据脚本

script添加数据脚本

arcgis python arcpy add data script添加数据脚本
mxd = arcpy.mapping.MapDocument("CURRENT")
... df =mxd.activeDataFrame
... theShape = ur"D:\chp5ex1\qxzf.shp"
... lyr = arcpy.mapping.Layer(theShape)
... arcpy.mapping.AddLayer(df, lyr, "AUTO_ARRANGE")
... arcpy.RefreshActiveView()
... arcpy.RefreshTOC()

05-08 15:48