Select to view content in your preferred language

Symbology script

143
3
2 weeks ago
temprobertcottreau131313
Frequent Contributor

Is there a script that can be used to automatically apply the symbology to a new layer from another layer in the same way as Import Symbology?

Thanks to all.

Robert..

Tags (3)
0 Kudos
3 Replies
BobBooth1
Esri Regular Contributor

You can use the Apply Symbology From Layer tool via Python. The help topic has sample code.

https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/apply-symbology-from-layer.h... 

BobBooth1
Esri Regular Contributor

Also, if you run the tool once by hand, you can copy the Python syntax from the geoprocessing history of the tool.

https://learn.arcgis.com/en/projects/run-geoprocessing-tools-with-python/#:~:text=export%20the%20cod...

You can take that code and modify it to be your own Python Script tool, see this tutorial:

https://learn.arcgis.com/en/projects/create-a-python-script-tool/

 

0 Kudos
JohnGuilfoyle
Occasional Contributor
Apply Symbology From Layer is a Data Management Tool in the System Tools.
It can be run for one Layer or Batch Processed to include multiple layers.
0 Kudos