AnsweredAssumed Answered

del layer

Question asked by karigunnarsson on Jan 16, 2011
Latest reply on Jan 16, 2011 by niklas.norrthonesri-se-esridist
how do I delete a layer

my_layer = "some name"
my_layer_location = r"c:\some_location"

arcpy.MakeFeatureLayer_management(feature_in, my_layer)
arcpy.SaveToLayerFile_management(my_layer, my_layer_location)

del my_layer

...

my_layer = arcpy.mapping.Layer(my_layer_location)
my_layer.credits = "Kari Gunnarsson"


This will give an ERROR

How can I do this without geting the Error?

Outcomes