What does this warning mean and how can i resolve it?

Node Name: Element.BoundingBox
Original Node Name: Element.BoundingBox
Package: Revit.Elements.Element.Query
Dynamo Version: 3.3.0.6316
Host: Dynamo Revit
Messages: Element.get_BoundingBox operation failed. 
Object reference not set to an instance of an object.
State: Warning

For context

We want to do something like this.
I have multiple way of doing it.
But the script using Bounding Boxes gives me this issue.
Even when i remove the nulls the node BoundingBox.PerimeterCurvesOnPlane
contains all Empty List.

what does BoundingBox.PerimeterCurvesOnPlane do? i mean if it only outputs 4 edges of a bbox, since u obtain min and max, u could construct those edges urself.

looks like the internal call of get_BoundingBox(view) failed on element no.140. sometimes i find recreating such an element makes the function call returns normally.

So so far @jacob.smalls .dyn from the link seems to work.

Still curious what the waning means.

The warning means that there is a missing property or invalid element.

Did you filter out unplaced and unbound rooms (List.FilterByBoolMask(rooms, rooms.Area>0)[‘in’];)?

I found there were some unbounded Rooms. So i guess that was the root of the problem.

Still it should have found the boundaries of the other Bounding Boxes no?

That other node is either from an old version and needs an update or you are missing a (working) dependency such as the right version of IronPython for your Dynamo build.

For what it is worth, bounding boxes are not ideal for renumbering rooms.

Yer i figured. What IS the best method in your opinion though?

It depends on the project - I like to do rooms by ‘logical sequence’, based on the same pattern typically used for addresses or hotel rooms where even numbers are on one side and odd the other, and lowest number rooms at the start of the curve and highest at the end of the curve. Rooms accessed only off another room get a suffix (.01 or A) and you go from there.

As a basis the logic is something like this you define the corridor travel paths as curves (useful for egress documentation so use those too), get the room the curve is in, get all doors which are in that room, sort the doors by where they are on the curve (parameter at point), get the room the doors swing into, remove duplicates, and number away.

But if you like drawing the spline, get the room boundaries, convert to polycurves, pull the to the same plane as the spline you drew, generate a surface from the outside loop, trim out the voids from the inside loops, intersect with the spline, pull the start point of the curve, parameter at point, and sort by key.

Often we don’t have such a logical pattern or we are dependend on what the client wants.

I also have a .dyn for that, but that one didn’t work (possible due to the unbounded Rooms i found later) so i tried the Bounding Box way.

But anywas. Case close (so far) :sweat_smile:

1 Like