Solved! Go to Solution.
import arcpy inFC = r"C:\tmp\Test_CopyAttr.gdb\RoadsFC" arcpy.MakeFeatureLayer_management(inFC, "Roads") mxd = arcpy.mapping.MapDocument(r"C:\tmp\MapProjects\Untitled1.mxd") df = arcpy.mapping.ListDataFrames(mxd)[0] lyrLayer = arcpy.mapping.Layer("Roads") arcpy.mapping.AddLayer(df, lyrLayer, "AUTO_ARRANGE") mxd.save() del mxd
import arcpy inFC = r"C:\tmp\Test_CopyAttr.gdb\RoadsFC" arcpy.MakeFeatureLayer_management(inFC, "Roads") mxd = arcpy.mapping.MapDocument(r"C:\tmp\MapProjects\Untitled1.mxd") df = arcpy.mapping.ListDataFrames(mxd)[0] lyrLayer = arcpy.mapping.Layer("Roads") arcpy.mapping.AddLayer(df, lyrLayer, "AUTO_ARRANGE") mxd.save() del mxd