I understand that in order to do a SelectByAttribute in Python, you need to first convert the shapefile to a feature layer using the MakeFeatureLayer_management function, and run the SelectByAttribute on that feature layer. My question is, is there a way to show your selection on the original shapefile? I don't want to create a new output and add it to the map document. I just want to run the script and have the selection shown on the map.
What I have. I want the selection to be shown on my FIELD shapefile.
shape = "FIELD" arcpy.MakeFeatureLayer_management(shape, "shape_lyr") arcpy.SelectLayerByAttribute_management("shape_lyr","NEW_SELECTION",""""TYPE" = 'HIGH'""")