Grouping windows from link by room

I’m trying to group glazing by room. Geometry (walls, windows, curtain panels etc) are in linked file, rooms in current.
With Curve.ExtrudeAsSolid method i can get a correct shape of a room, that dynamo shows like solid. But when i use it in python with ElementIntersectsSolidFilter i get this error:

Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
Traceback (most recent call last):
File “string”, line 17, in module

TypeError: expected Solid, got Solid

I would appreciate any help, how to fix it:

Revit 2017.2; Dynamo 1.3; Clockwork and Springs nodes are used.


import clr
from Autodesk.DesignScript.Geometry import *
import Autodesk
from Autodesk.Revit.DB import *
dataEnteringNode = IN

rooms = IN[0]
elems = IN[1]
filteredElems =

for room in rooms:
filter = Autodesk.Revit.DB.ElementIntersectsSolidFilter(room)
for elem in elems:
if filter.PassesFilter(elem):
OUT = filteredElems

If i use BoundingBox.Intersects method, it works, but there are some rooms with arc-shaped walls and this gives wrong grouping. Changed it to Geometry.DoesIntersect, but it’s toooooo slow, not sure if it works.

This error means that you need to convert the solid from a Dynamo solid to a Autodesk.Revit.DB.Solid

I recommend downloading the bimorph nodes package; it has a lot of nodes for working with linked Revit files, including Element.Intersects and Element.IntersectsSolid

Thank you 4 linking bimorph, it’s useful.

Still confused with conversion. What method would you recommend 4 it?
I can’t find a direct conversion, that returns revit geometry, only those creating some instances. And misc geometry extraction nodes return once more dynamo solids.

For my task I used geometry intersection, after filtering elements more accurately it works.