0

Every guide/tutorial I found explains how to apply symbology to a layer using the "arcpy.ApplySymbologyFromLayer_management". Instead, I do have a style file, and I want to match the fields on the attribute file with the icons on the style file, through python (point layer, unique values symbology).

Is it even possible to do that through python?

I ask that because there are over 100 icons on the style file, each one for a possible value. If I use Apply Symbology from Layer, I will end up with dozen empty icons on the legend, which I have to remove manually. So if anyone also knows how to remove icons that the count is zero on the symbology (through python), it also works

1 Answer 1

1

The 'Match to symbols in a style' function of ArcMap is currently unavailable in ArcGIS Pro, and is the subject of an FAQ: Can I match symbols to a style in ArcGIS Pro? which includes a workaround. However, after that is made available to the ArcGIS Pro GUI, it will still need to have access by ArcPy provided.

On the other hand only showing symbols in the legend when they appear within the current map extent can be accomplished without code using Only show features visible in the map extent.

1
  • The second paragraph is not an option, because later I upload to AGOL and there is no way to apply this there. I will try what you suggested tomorrow, thanks!
    – Gustavo
    Commented Nov 14, 2019 at 2:06

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