cgarlock

AddLayer.arcpy

Discussion created by cgarlock on Mar 28, 2013
Latest reply on Mar 28, 2013 by Tonyalmeida
Hi,

There is probably a simple solution: My question is....After adding a layer with this similar script

addLayer = arcpy.mapping.Layer(r"C:\Project\Data\Orthophoto.lyr")
arcpy.mapping.AddLayer(df, addLayer, "BOTTOM")
mxd.saveACopy(r"C:\Project\Project2.mxd")
del mxd, addLayer

how do I get the layer to stop adding to the map each time I run the script. I thought del, addLayer would work but each time I run it the layer continues to add to the dataframe.


Thank you

Outcomes