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 nodeBoundingBox.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.
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.
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.