AnsweredAssumed Answered

Highlight Selected feature

Question asked by nikfal on Apr 9, 2018
Latest reply on Apr 9, 2018 by Dan_Patterson

I am trying to select some features by "SelectLayerByAttribute_management" like this:

flayer = arcpy.MakeFeatureLayer_management(r"D:\LAKES.shp", "myLayer")
arcpy.SelectLayerByAttribute_management(flayer, "NEW_SELECTION", """"NAME" = 'Clarks Hill Lake'""")
cnt = arcpy.GetCount_management(flayer)
print cnt
arcpy.RefreshActiveView()

Everything is fine and cnt = 1, but in the map, it is not highlighted. How can highlight selected feature when you are running the arcpy script out of ArcGIS environment. 

Outcomes