Applying Symbology

552
1
02-17-2017 08:26 AM
MarcosMendez
New Contributor III

Is there a way to apply symbology from a layer file into a shapefile through python? I would imagine that the shapefiles would have to be referenced on an existing mxd in order to apply the associated layer file symbology when referencing it on the line of code in python.

0 Kudos
1 Reply
IanMurray
Frequent Contributor

Technically you can apply the symbology to a Layer Object either before or after adding it to a map document, you just have to have the layer object created first.  Also technically you can't apply symbology to a shapefile itself, but to a layer that references a shapefile.

http://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/apply-symbology-from-layer.ht...

I'm going to try to find a post from last week where this was discussed.

Edit: Found it, should give you some decent code to work off of as well. 

https://community.esri.com/message/665189-changing-symbology-in-python