Updating layer symbology

There may be times when you will want to change the symbology of a layer in a map document. This can be accomplished through the use of the UpdateLayer() function, which can be used to change the symbology of a layer as well as various properties of a layer. In this recipe, you will use the UpdateLayer() function to update the symbology of a layer.

Getting ready

The arcpy.mapping module also gives you the capability of updating layer symbology from your scripts by using the UpdateLayer() function. For example, you might want your script to update a layer's symbology from a graduated color to a graduated symbol, as illustrated in the following screenshot. UpdateLayer() can also be used to update various layer properties, ...

Get Programming ArcGIS with Python Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.