# 内置类别

Introduction

扩展库支持引用所有 Revit 中的内置类别的ElementId

# 内置类别ElementId

通过类 BuiltInCategories 我们可以直接访问内置类别的ElementId,如下:

//无效类:返回BuiltInCategory枚举类下的INVALID的Id
BuiltInCategories.Invaild

//门类:OST_Doors
BuiltInCategories.Door

//电缆桥架类:OST_CableTray
BuiltInCategories.CableTray

//电缆桥架配件:OST_CableTrayFitting
BuiltInCategories.CableTrayFitting
....

# 按视图规程获取

扩展包支持按视图规程ViewDiscipline获取内置类别

//传入视图规程
List<ElementId> elementIds = BuiltInCategories.GetCategoryIdsByViewDiscipline(ViewDiscipline viewDiscipline);