Quantcast
Channel: All Revit API Forum posts
Viewing all articles
Browse latest Browse all 66672

Re: How to retrieve rooms filtered by level?

$
0
0

Moreover, I have the following code to retrieve the level of the design.

 

public List<Level> GetAllLevels()
        {
            List<Level> levelCollection = new List<Level>();
            FilteredElementCollector collector = new FilteredElementCollector(_document);
            ICollection<Element> collection = collector.OfClass(typeof(Level)).ToElements();
            foreach (var e in collection)
            {
                Level level = e as Level;

                if (null != level)
                {
                    // keep track of number of levels
                    levelCollection.Add(level);
                }
            }
            return levelCollection;
        }

But from this list, I need to query the rooms for each of the level separately.

 

Thanks


Viewing all articles
Browse latest Browse all 66672

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>