Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

AddLayer.arcpy

$
0
0
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

Viewing all articles
Browse latest Browse all 2485

Trending Articles