Updating layer properties
In the previous recipe, you
learned how to update the symbology of a layer. As I mentioned, UpdateLayer()
can also be used to update various properties of a layer, such as field aliases, query definitions, and others. In this recipe, you will use UpdateLayer()
to alter various properties of a layer.
Getting ready
You can also use the UpdateLayer()
function to update a limited number of layer properties. Specific layer properties, such as field aliases, selection symbology, query definitions, label fields, and others, can be updated using UpdateLayer()
. A common scenario is to have a layer in many map documents that needs to have a specific property changed across all the instances of the layer in all map documents. To accomplish this, you will have to use ArcMap to modify the layer with the appropriate properties and save it to a layer file. This layer file then becomes the source layer, which will be used to update the properties of another layer called update_layer...