📅  最后修改于: 2022-03-11 14:58:15.188000             🧑  作者: Mango
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));
}