mxd = arcpy.mapping.MapDocument("current") #or provide full path to MXD df = arcpy.mapping.ListDataFrames(mxd, "df name") #replace with actual df name lyr = arcpy.mapping.ListLayers(mxd, "MyShapeFileLayer")[0] #replace with acutal layer name in TOC arcpy.mapping.RemoveLayer(df, lyr) mxd.save()
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.