ArcPro: Attributes disappearing when symbology changed to Unique Values but don't re-appear when changed back to Single Symbol.

405
0
01-30-2020 05:02 AM
KatieJ
by
New Contributor

I have a shapefile called (AOI) with multiple AOI's and wanted to colour them by ID so that they were all different.

I used:

aprx = arcpy.mp.ArcGISProject('current')

m = aprx.activeMap

AOI = m.listLayers('AOI')[0]

sym = AOI.symbology

sym.updateRenderer('UniqueValueRenderer')

colorRamp = aprx.listColorRamps("Cyan to Purple")[0]

sym.renderer.colorRamp = colorRamp

AOI.symbology = sym

I have also tried doing this manually as well and the same problem occurs. They also do not re-appear when I change the symbology back to Single Symbol.

Any thoughts?

0 Kudos
0 Replies