Change Layer Color

550
2
02-15-2013 04:45 AM
babakkasraei
New Contributor II
Hi


How can I change the color of a polygon layer in my map using python codes.

Thanks for your help

Babak
Tags (2)
0 Kudos
2 Replies
JeffMoulds
Esri Contributor
Arcpy has a limited set of symbology properties that can be manipulated. (See the symbology and symbologyType properties on the Layer class for more details.) Directly changing the color is not one of the properties that is exposed. However, there is a workflow than can be used to accomplish this. The UpdataLayer function has a symbology_only property that will take the symbology of a seed .lyr file and apply it to another layer in a map or .lyr file. The seed .lyr file needs to contain the symbology that you want to apply to the update_layer.

The fist code example in the UpdateLayer help topic should do exactly what you want.
0 Kudos
babakkasraei
New Contributor II
Thank you Jeff
0 Kudos