📜  获取所有房间 revit api - 任何代码示例

📅  最后修改于: 2022-03-11 14:58:15.188000             🧑  作者: Mango

代码示例1
public List getRoomFromLevel(Document document, Level level)
        {
            
            List Rooms = new FilteredElementCollector(document).OfClass(typeof(SpatialElement)).WhereElementIsNotElementType().Where(room => room.GetType() == typeof(Room)).ToList();

            return new List(Rooms.Where(room => document.GetElement(room.LevelId) == level).Select(r => r as Room));
        }