Select to view content in your preferred language

Programmatically Remove Empty Symbol Classes

387
1
10-15-2024 01:58 PM
Labels (2)
MarkHammond4
Emerging Contributor

I'm looking for a way to programmatically remove empty symbol classes from the Contents pane. Although it's easy to remove empty symbol classes by going to the Symbology pane and removing classes with a count of 0, I need to automate this with ArcPy. Maybe using the CIM is necessary?  I'm trying to do this on a View Service with symbol classes based on domains. 

Tags (2)
0 Kudos
1 Reply
MSus4
by
New Contributor

Did anyone have a solution for this? Many times there are bunch of symbol classes with count of 0, changing the order according the count will mess up the order of the symbology and finding hundreds of count 0 -items in between used values is a hassle. 

0 Kudos