arcgis python arcpy add data script添加数据脚本

时间:2024-12-18 08:08:07

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