1

I have some ArcMap addin that creates new layer and add it into table of content. I need to set up a symbology for the newly created layer based on the attribute table (three differnet values > three diferent colours). Is it possible to manage symbology that way using Python (arcpy.mapping module)?

This is part of my script, but it's only add labes:

mxd = arcpy.mapping.MapDocument("CURRENT")
data_frame = mxd.activeDataFrame

layer_divide = arcpy.mapping.ListLayers(mxd, "layer", data_frame)[0]
if layer_divide.supports("LABELCLASSES"):
    for lblclass in layer_divide.labelClasses:
        lblclass.expression = '"{}" + [FID] +  "{}"'.format("<FNT size = '20'>","</FNT>")
        lblclass.showClassLabels = True

layer_divide.showLabels = True
arcpy.RefreshActiveView()

I can't find any help how to specify a symbology. Is it even possible?

3

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.