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.