Geometry.boundingbox 1.3 vs 2.0

Still very new to dynamo but I was working on a script for renumbering rooms using a spline. The scripts works fine when using 1.3 but if I open the script in 2.0, I get the error:

Warning: Geometry.BoundingBox expects argument type(s) (Autodesk.DesignScript.Geometry.Geometry), but was called with (Revit.Elements.Room).

So I’m guess I need to change something but I’m at a loss.



1 Like

You’re almost there, try this in between elements and geometry:

That corrects that portion but it breaks the rest of the function. As I understand it, it now sees the rooms as solids and so when I get to the part where I am wanting to set parameters, I no longer have a list of room elements but a list of solids. I’m unsure how to get the room element list in the same order as the solids now.


Use Element.BoundingBox instead. V2 no longer uses dynamic distpatch to resolve properties (i.e. query nodes), which is why you are now seeing the error (Geometry.BoundingBox expects an instance from one of the Geometry sub-classes, not a Revit.Elements.Element).

1 Like

OK, that fixed it. Thanks for the help. I still have a lot to learn.