import arcpy mxd = arcpy.mapping.MapDocument("path to mxd") lyr = arcpy.mapping.ListLayers(mxd, "layer name")[0] arcpy.SelectLayerByAttribute_management(lyr, "NEW_SELECTION", "some query") mxd.save() #If you don't want to save the selection to the existing MXD, try saving it to another file: mxd.saveACopy("path to new MXD")
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.