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

Re: REVIT API - Rooms Get Boundaries Segments

$
0
0

I don't see where the issue is, where are you trying to convert Element to Room? You should be able to do that fairly easily. The way I usually go about it when using a Filtered Element Collector is by Casting to the type I need and sending it to a list. (You'll need a reference to System.Linq for this).

List<Room> list = collector.WherePasses(filter).Cast<Room>().ToList();

 However, reassigning an Element to a Room variable while iterating over the collection should also work just as well. What issues were you having with it? 


Viewing all articles
Browse latest Browse all 66708

Trending Articles