I was quite surprised to find that Revit Floors don’t have Span Lengths or Widths.
I have just started using dynamo and initially tried to estimate the Floor dimensions using Bounding Boxes as that can give me the coordinates of the min and Max values of XYZ for each instance of floor, however if a floor is rotated, the estimation falls apart.
I have now tried to identify surfaces and collect the xyz points from the corners of each surface from each instance. I got stuck at identifying the points from the surfaces. can anyone help?
If however there is a simple method of identifying Floor Spans and Widths already please let me know as that is my end goal, so I can set them as instance parameters that I can schedule.
Floors do have a “span direction” value built into revit which is used to define the direction which joists span. I think what you need is a means of pulling that element, set the coordinate system to use that rotation, and then pull the dimensions using those angles.
A means of getting the span direction can be found here:
The python script:
import clr
elist = IN[0]
elements = []
out_list = []
for i in range (0, len(elist)):
elements.append(UnwrapElement(elist[i]))
for i in elements:
angle = i.SpanDirectionAngle
out_list.append(angle)
OUT = out_list
Note that the output is in Radians. Give that a shot and see where you get.
Thank you so much for that script, I don’t know how to write python (YET)
Do you believe it to be possible to apply that angle to the bounding box/then I can get all the X,Y,Z Points of the Floors, which could be used to identify the Span Length.