Skip to main content
edited tags; edited title
Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345

How does pne create Creating grouping for the C# ArcObjects UniqueValueRenderer?

Source Link

How does pne create grouping for the C# ArcObjects UniqueValueRenderer?

Within a C# procedure I am able to successfully render discrete data values using:

pValRen.AddValue("A11", fieldName, (ISymbol)pExpressWay);
pValRen.AddValue("A15", fieldName, (ISymbol)pExpressWay);

where pValRen is a UniqueValueRenderer() object, and, the strings "A11" and "A15" refer to discrete data values. But, I need to group "A11" and "A15" together with a single reference value as suggested in the online help.

I have attempted to create a group using:

pValRen.AddReferenceValue("A15", pValRen.ReferenceValue["A11"]); 

or

pValRen.AddValue(pValRen.ReferenceValue["A11"], fieldName, (ISymbol)pExpressWay);

but, both of these approaches result in an error. How does one construct and use a ReferenceValue for the UniqueValueRenderer?