开发者

How to get all parameter choices in Revit?

开发者 https://www.devze.com 2023-01-28 00:52 出处:网络
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?They are sto

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?


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;
        }
    }
}
0

精彩评论

暂无评论...
验证码 换一张
取 消