I have a
FeatureLayer and I want to enumerate all the symbols used in it. Simple way - it is to call
SymbolByFeature for each features. Something approximately likes:
Dim l as IFeatureLayer Dim c as IFeatureCursor Dim r as IFeatureRender Dim f as IFeature Dim s as ISymbol Set r = IGeoFeatureLayer(l).Renderer Set c = l.Search(0, True) Set f = c.NextFeature Do Until f is Nothing Set s = r.SymbolByFeature(f) [...] ' check whether this symbol is in collection and add it if necessary Set f = c.NextFeature Loop
The problem with this method is that it too long, especially when there is a lot of features in the feature layer.
Question: Is there a faster way to get a collection of all the symbols in a feature layer?