I'd like to use specific colors for my Unique Values. I tried creating another layer. choosing the colors that I want, and using the ApplySymbologyFromLayer. I also updated my new layer to make sure it was classified as Unique Values. When I refresh my map, no colors are showing up, and the wrong Value Field is appearing when I manually look at symbology. Has anyone else had this problem? I get no error messages, and when I print the valueField and the symbologyType, the correct fields appear.
Here is my code -
color_layer=arcpy.mapping.ListLayers(mxd)[-6] lyr=arcpy.mapping.ListLayers(mxd)[-1] arcpy.mapping.UpdateLayer(df,lyr,color_layer,True) lyr.symbology.valueField="color" lyr.symbology.addAllValues() arcpy.RefreshActiveView() arcpy.RefreshTOC() arcpy.ApplySymbologyFromLayer_management(lyr, color_layer) arcpy.RefreshActiveView() arcpy.RefreshTOC()