Dynamo fails to fetch room geometry

Hello,
I have a simple exercise where I have to write room name into a family parameter if the family is in the room.
I know about the point is in room node but this case it is not useful for me as i have to scale the rooms up so they will contain the bordering elements on the facade.
The main issue is I have 3000+ rooms and when I try to fetch geometry revit just goes stall. I left it overnight maybe it will finish but it did not. I tried to get the boundary curves so I can do a patch then an extrusion but that one fails for majority of the rooms even though they are bounded. Many room returned curves that made no sense and it was not possible to group them. I tried to do it level by level where I only have 500 room in my list but i get the same result.
I’m out of ideas how this can be done.
I’m pretty flattered if it is even possible at this point.

hi @daninet90

are you also trying to get the intersection of room geometry to any geometry?
if that is the case, I think, you have insufficient RAM.

-biboy

Hi!
Not yet. So far I only have a handful of nodes to filter zero area rooms then get the element geometry.

can you share a screen shot of the script?

i have 64gb of ram, it should be plenty. Revit is not using quarter of it.

hi @daninet90

Is it possible to get a copy of your dynamo code and your Revit file (a sample file will be OK if it also fails to the script).

I also have 64GB of ram but when I run a 200+ room script and get the rooms intersection to 30,000++ pipes, I always get the error of memory full.

-biboy

Do it in chunks as you noted before.

  1. For everything inside the building use the PointIsInRoom method in the first graph.

  2. For windows and doors, first filter out windows and doors who have a ‘Room’ value from #1 above, then use the from room value, unless that is blank in which case replace the value with the ToRoom value.

  3. For remaining families, first filter out families who have a ‘Room’ value from #1 above, and then merge all the room geometry into one solid. Next get the location of each family instance and break that number down to a point. Next find the ClosestPointTo on the room solids to the point in question, and build a vector from the location point to the closest point. Translate the location point along the vector by the vector’s length + an overrun distance. Then try the ‘room at point’ method from as before.

Hi! Thanks for your reply. We are diverting a little bit from the original topic that I’m not able to get element geometry for >150 rooms at the same time. I will try to do it in smaller batches but obviously at some point it will reaches the limit where it is not worth the struggle with manually divide lists and run in small batches, then close the transacion by closing dynamo then reopen the do it again and so on… then maybe I will just give it to a draftman to do it in a day.

As for the closestpointto, that is a very good tip, thanks. However I think in my case it is a bit more complicated, this is a building where not all the rooms have facade, there are interior corridors, janitor rooms, etc. I dont have a good way to filter these out as there is no parameter for perimeter and interior room.
The elements I want to write the room number into are mainly windows, curtain panels, generic models. All on the facade. So I figured out if I enlarge the room solid in X and Y direction by 1.2 factor they are sticking out of the building and I intersect the points and the solids. This way the interior rooms will not have any match and they are filtered out.

This is how I did the intersect:

Unioning the room solids into one solid will resolve that problem. :slight_smile: