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")
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.