Quantcast
Channel: Question and Answer » arcpy
Viewing all articles
Browse latest Browse all 767

ARCGIS10: updatelayer results in error – LayerObject: Get attribute renderer does not exist

$
0
0

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 : LayerObject: Get
attribute renderer does not exist

Could you please help me.
Thank you in advance,

Ronny


Viewing all articles
Browse latest Browse all 767

Trending Articles