simon6

Symbology issue: import lyr file for multiple fc's and remove values where count = 0

Discussion created by simon6 on Jun 12, 2012
So I see my problem could have 2 (or more?) solutions:
approach1:
so I have a feature class with a field containing unique values (say A thru Z). I created a nice polygon lyr file for it. Let's called it full_alphabet.lyr. I exported each value and created A.shp, B.shp etc.
I added all 26 shps to my view. I tested the following manually and it sort of works but there's always a 'but' with ESRI...
when I apply the full_alphabet.lyr to one of my shp's (other values are unchecked in the lyr)... the color matches of course but in the TOC I still see all 26 colors. I just want it to show color A for A.shp and B for B.shp. So I was thinking is there a way to remove values in the symbology tab where count ==0?

approach2:
I have my feature class with a field containing unique values (say A thru Z). I could copy/paste this layer 25 times and apply a definition query. import the full_alphabet.lyr 25 times and the colors will match but my TOC will contain all 26 values again. How to trim for unique values? so my fc will have def. que=a and only color a etc.

I think approach 2 is the cleanest, because I don't have to import and create new SDE fc's.
Perhaps, there's another way? Id' like to automate this with a c# addin.
Thanks!

Outcomes