1

I'm using ArcMap 10.4.1.

I am trying to update a point layer symbology with a premade lyr file, then adjusting it's class break values in arcpy. It's working fine, only it changes the symbols back to default (while the colours stay correct). I don't want my points to have a stoke/outline and can't change that with arcpy, so thats a problem.

Here's my code:

updateLayer = arcpy.mapping.ListLayers(mxd, "FC", df)[0]
FClyrpath = "FCsymology.lyr"
sourceLayer = arcpy.mapping.Layer(FClyrpath)
arcpy.mapping.UpdateLayer(df,updateLayer,sourceLayer, symbology_only = True)

lyr = arcpy.mapping.ListLayers(mxd, "FC", df)[0]

if lyr.symbologyType == "GRADUATED_COLORS":
    lyr.symbology.valueField = "depth"
    lyr.symbology.classBreakValues = [3, 5, 8, 11, 12, 15, 18, 21, 24, 72]

arcpy.RefreshTOC()

This is what my premade ".lyr" symbology looks like:

lyr

This is what happens when changing the classbreakValues: The classification is good, the strokes around the symbol not.

after

I also tried changing the default symbology in AdvancedArcMapSettings, but no avail.

0

1 Answer 1

0

I had the same problem with some polygon layers and found that it is an ESRI-related bug. See this link for more details on it.

2
  • In a case like this it is probably best to raise a flag and suggest that this is a duplicate of the other question.
    – PolyGeo
    Commented Dec 21, 2016 at 8:01
  • Thanks a lot! I had been stuggeling with this for a long time!
    – Silke
    Commented Jan 19, 2017 at 20:08

Not the answer you're looking for? Browse other questions tagged or ask your own question.