2

There is an element's parameter that has like 5 choices (combobox's style). I know how to get the current selected one, but is there a way to retrieve the 4 other choices?

Singleton
  • 3,701
  • 3
  • 24
  • 37
Wildhorn
  • 926
  • 1
  • 11
  • 30

1 Answers1

3

They are stored in SimilarObjectTypes as an ElementSet.

foreach (Element elem in elemSet)
{
    Parameter param = elem.get_Parameter(paramName);

    if (param != null)
    {
        var similar = elemparam.SimilarObjectTypes;

        foreach (Element choice in similar)
        {
            string ChoiceName = choice.Name;
        }
    }
}
skeletank
  • 2,880
  • 5
  • 43
  • 75
Wildhorn
  • 926
  • 1
  • 11
  • 30