I am using ArcMap 10.4.
I am creating a Python Toolbox which runs through a series of calculations and geoprocessing tools. The Toolbox is an update of an old VBA script I ran in ArcMap 9.3, where it ran perfectly. I am updating it to run in ArcMap and Pro.
One of the functions used is intersecting a user defined polygon with a larger base layer. This base layer contains a number of fields, including a code which I use to apply a Symbology to it.
I am having an issue assigning the symbology of the larger Polygon Layer to the smaller intersected Polygon using the
The blue area should be the speckled the white and brown from the first picture. I thought maybe there was an issue with the attribute code I was using to assign the symbology, but when I used the "Import Symbology" under the Symbology Tab, the correct symbology was displayed.
The attribute for the symbology is a 5 digit number, it is static, so will never change.
The symbology itself is the "Unique Value" option. The code I am using is below. I have already imported arcpy and completed the intersection before this code runs.
#File to symbolise Sym_In = FileN #Location of the lyr file to use Sym_Lay = r"C:\Data\Layer_v2.lyr" #Even if I put the field containing the code in here...nothing changes Sym_Field = "" arcpy.ApplySymbologyFromLayer_management (Sym_In , Sym_Lay)
Is there a way to get the result of the
applysymbologyfromlayer to match the "Import Symbology" button in the layer properties?