Elements in room node Issue

Hi all,

while trying to script a way to get all elements contained in the room, I got to the error in node Elements in Room.

When a category such as Mechanical Equipment is selected everything works fine as shown in the picture:

However, when a category such as Pipes or Ducts is selected, the node gives the following error:

Is this expected behavior?..not sure do I miss something…

Hi @Marcelo.Rak,

You could try with the Element ToRoom node of the Genius Loci package.

In Revit Ducts or Pipes it takes two points to create one. So more than one Room would be in the List?
With Mechanical Equipment it takes just one point.
Also, is the Room height sufficient? Pipes and Ducts are mostly above Ceiling i think.

1 Like

It looks like the package you are using is looking for the family.Location.Point property of elements. (If that is the Archi-Lab node). A lot of elements won’t have that property. This will include system families and line based families.

So what you are after may take some thing much more robust than something looking for a simple point. For something like pipes you would have to look at the line from the start point to the end point or the actual geometry of the object itself and see if that intersects the room geometry. And yes - as noted - if the ceiling constrains the upper limit of the room with a pipe above the room, that will be an additional problem to work around. You would have to do something like ray casting to the floor or level below for all objects and see if they intersect the room at that level.

Yes - this is expected with ths node. It is functioning as designed.

Yes always difficult to say which space pipe or duct or walls, curtain walls belong to…with pipes and duct you can use parameteratpoint on the location line and intersect them…

And just glancing at the ToRoom from Genius Loci, it looks like that is picking up both location points, location curves and bounding boxes. The curves seem to be reduced to the midpoint of the curve for determining the location.
pt=loc.Curve.Evaluate(0.5, True)
Same for the bounding box location - it looks like the center of the bounding box is being used as a location point.
uv=(bbox.Min+bbox.Max)/2