I am trying to add shapefile using ArcPy, but each time my script is ending in showing runtime error? I am using ArcGIS 10.
Here is my script
import arcpy
from arcpy import env
Master="G:\path\To\ShapeFile.shp"
mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListDataFrames(mxd,"*")[0]
layer = arcpy.mapping.Layer(Master)
arcpy.mapping.AddLayer(df, layer,"BOTTOM")
arcpy.RefreshActiveView()
arcpy.RefreshTOC()
This script works fine when I add .lyr files, but why it isn't working for .shp
C:\GIS\Simple.shp
to make sure it works with the simple path. – Alex Tereshenkov Mar 3 '16 at 9:37