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()