I have a layer file and I need to apply unique value categories to that layer based on the field present in attribute table of that layer
I tried using:
input = arcpy.GetParameterAsText(0)
output = arcpy.GetParameterAsText(1)
symbologyFields = {"VALUE_FIELD", "#", "symbol"}
arcpy.ApplySymbologyFromLayer_management (input, output,symbologyFields)
But this code shows an error that ApplySymbologyFromLayer_management can accept only two arguments. But I took this code from ArcGIS tool reference site http://pro.arcgis.com/en/pro-app/tool-reference/data-management/apply-symbology-from-layer.htm
What actually I need is to color my polygons using the values in the attribute table field.
i.e.
I can say that apply symbology by going into properties tab and click on categories and the unique values and select the field. This I am in need of doing it with the help of code.
Can anyone help regarding this?
{}
button that enables you to format any highlighted code nicely. – PolyGeo♦ Mar 21 '18 at 8:56symbologyFields = {"VALUE_FIELD", "#", "symbol"}
tosymbologyFields = ["VALUE_FIELD", "#", "symbol"]
. There should be no curlybrackets – BERA Mar 21 '18 at 10:09