Question

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?

Was it helpful?

Solution

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;
        }
    }
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top