1

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?

1 Answer 1

1

First you have to add a value, in your case this would be "A11" and then add the reference value(s), i.E. "A15". In my codesnippet i have an array arLiterals with all items to group:

    string sRefV=arLiterals[0];
    pValRen.AddValue(sRefV, sHeading, iSymbol);
    pValRen.set_Label(sRefV, sClassLabel);
    if (arLiterals.Length > 1)
    {
      for (int l = 1; l < arLiterals.Length; l++)
      {
          pValRen.AddReferenceValue(arLiterals[l], sRefV);
      }
    }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.