Answers for "get all rooms revit api"

0

get all rooms revit api

public List<Room> getRoomFromLevel(Document document, Level level)
        {
            
            List<Element> Rooms = new FilteredElementCollector(document).OfClass(typeof(SpatialElement)).WhereElementIsNotElementType().Where(room => room.GetType() == typeof(Room)).ToList();

            return new List<Room>(Rooms.Where(room => document.GetElement(room.LevelId) == level).Select(r => r as Room));
        }
Posted by: Guest on August-02-2021

Browse Popular Code Answers by Language