I am attempting to automate symbology using python, and ArcMap 10.0. I am importing this script into a toolbox, which I run from arcmap
Currently I am getting two errors:
1) LayerObject: Set attribute renderer does not exist. I am not sure what the problem is.
2) When I change true to false, Could not find replacement layer.
Here is my code:
import arcpy
mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListDataFrames(mxd)[0]
updateLayer = arcpy.mapping.ListLayers(mxd, "*", df)[0]
sourceLayer = arcpy.mapping.Layer(r"C:\me\fun.lyr")
for lyr in updateLayer:
arcpy.mapping.UpdateLayer(df, updateLayer, sourceLayer, True)
#UpdateLayer ( data_frame, update_layer, source_layer, {symbology_only})