I'm quite new in using Python in Arcgis 10. I wanted to use the symbology of a geostatistical layer in the TOC in another geostatistical layer in the TOC. Therefore, one should use arcpy.mapping.updatelayer. I saved the geostatistical layer as Layer file (TensorStyle.lyr). The code to copy the symbology looks like
import arcpy
mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListDataFrames(mxd)[0]
updateLayer = arcpy.mapping.ListLayers(mxd, "*", df)
sourceLayer = arcpy.mapping.Layer("TensorStyle.lyr")
for lyr in updateLayer:
arcpy.mapping.UpdateLayer(df, lyr, sourceLayer)
If I run the script I get the message:
Runtime error <type 'exceptions.AttributeError'>: LayerObject: Get attribute renderer does not exist
Can you help me?