AnsweredAssumed Answered

More issues with updating symbology outline with arcpy

Question asked by justin_grana on Oct 10, 2014
Latest reply on Oct 10, 2014 by justin_grana

This is mostly in reference to bug NIM085601 and is also the main issue in this post and this, although there are still unanswered questions as of august 6th.


The issue is simple, I have a layer in a map document (main_layer) and a (source_layer).  I want to apply the symbology from source_layer to main_layer and then change the classBreakValues attribute.  My python script is simple




source_layer = arcpy.mapping.Layer(symbology_layer)

break_values = [1., 2., 3. ,4.]

arcpy.mapping.ListLayers(mxd)[0].symbology.classBreakValues = break_values

arcpy.mapping.UpdateLayer(df, arcpy.mapping.ListLayers(mxd)[0], source_layer, True)



However, in the source layer, the outline has width 0 but **only when I change the break values**, the width reverts back to default.


I have updated to Arc 10.2 and this is still occurring.


Also, the reason that I change the break values before calling the UpdateLayer function is because when I do it after, I get:


  File "C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy\arcpy\arcobjects\", line 89, in _set

    return setattr(self._arc_object, attr_name, cval(val))



which I think is also related to this (unanswered) question.


Thanks to anyone that might be able to help.  I would be happy to share mapdocuments and code for replication.