How can I change the symbology of a layer with single symbol to unique values with Python. I don't know how to update it.
I used this code:
import arcpy
mxd = arcpy.mapping.MapDocument("CURRENT")
lyr = arcpy.mapping.ListLayers(mxd,"region")[0]
if lyr.symbologyType == "UNIQUE_SYMBOLE":
lyr.symbology.valueField = "REGION"
lyr.symbology.addAllValues()
arcpy.RefreshActiveView()
arcpy.RefreshTOC()
del mxd
The code runs but doesn't change anything (no error message) the problem is that I want to change the symbology of the layer displaid with single symbol to category "uniques values"?