#... other logic tempLayer = "layer" # Make a layer from the feature class arcpy.MakeFeatureLayer_management("C:/data/mexico.gdb/cities",tempLayer) addLayer = arcpy.Layer(tempLayer) arcpy.mapping.AddLayer(df, addLayer, "AUTO_ARRANGE") arcpy.RefreshTOC()