(If you’re using Firefox, then right click and Save Link As)
Download the Update Layer Properties Toolbox
View the Source Code
(any donations go towards hosting costs)
The Update Layer Properties tool updates a layer’s symbology, labels, field aliases, selection symbology, definition queries, etc – based on an existing input layer file. So, simply put, any setting within the Layer File properties will be updated.
Normally, when you update a layer’s properties within ArcMap with a layer file, it re-sources the layer to the same data source as the layer file. I’ve made it so that after the properties are loaded from the layer file, the layer in ArcMap re-sources back to its original data source.
For an example, say you have Layer A, Layer B, and Layer C which have the same underlying schema, but different data. You set all the layer properties for Layer A (symbology, label classes, definition query, transparency, etc) and save it as a layer file.
Now, you want to apply all these properties to Layer B and Layer C without setting them manually. This tool allows you to do that while keeping the original data source, which is the main point of the tool. Because as previously mentioned, when you use the arcpy.mapping.UpdateLayer() it re-sources the layer back to the data source the layer file was originally created from.
This is the GIS Stackexchange question which led to me creating this tool.
Here’s a screenshot of the parameters:
I hope someone finds this tool useful. Please leave a comment if you have any questions or problems, and be sure to check out the other tools I’ve created!
15 thoughts on “ArcGIS Toolbox – Using a Layer File to Update Layer Properties”