I have a situation where I have a unique values source layer file that I use to update polygon feature classes with the appropriate symbology.
arcpy.mapping.UpdateLayer() does a great job, however, it applies all possible values ( 428 possibles ). This makes the legend unusable, and I only need the 10-20 I actually have values for in the feature class. Using the symbology.addAllValues() changes my labels AND reorders the colors assigned to the unique values, frustrating.
arcpy.ApplySymbologyFromLayer_management() only applies the ones I have values for in the feature class, fantastic, except it doesn't respect the headings from the source layer file. What do I do?
Do I edit each layer file I'm creating to add in the headings, etc... that I need? OR
Do I open each layer file and delete all values that have a zero count?
Keeping in mind that there are many of these files generated daily.
Thanks for your time and any offer of help,
Brandon