【发布时间】:2021-10-11 04:56:15
【问题描述】:
插件组合了属于某个类别的元素的选定参数。插件中没有内置类别,如何让用户选择一个?
List<string> stringParametersForComboBox4 = new List<string>
{
"OST_PipeAccessory",
"OST_Sprinklers",
"OST_MechanicalEquipment"
};
foreach (string name in stringParametersForComboBox4)
{
comboBox4.Items.Insert(0, name);
}
private void button1_Click(object sender, EventArgs e)
{
FilteredElementCollector collector = new FilteredElementCollector(revitDoc);
ElementCategoryFilter filter = new ElementCategoryFilter(BuiltInCategory.OST_PipeAccessory);
//Applying Filter
IList<Element> ducts = collector.WherePasses(filter).WhereElementIsNotElementType().ToElements();
【问题讨论】:
标签: c# plugins combobox concatenation revit-api