Hi All,
I’m looking for how to get the rotation of an element using Dynamo. The value I’m looking for is in the following image:
Any tip of advice will be very well received!
Regards!
Hi All,
I’m looking for how to get the rotation of an element using Dynamo. The value I’m looking for is in the following image:
Any tip of advice will be very well received!
Regards!
The goal here is to get the True North Rotation for some elements (Structural Columns).
Thanks in advance. Any tip of advice will be very well received!
Regards!
If you are able to obtain the element’s location you can easily get its rotation (in radians) using something like this:
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
def get_rotation(e):
location = e.Location
if isinstance(location, LocationPoint):
rotation = location.Rotation
return rotation
return 0
element = UnwrapElement(IN[0]) # Assume single Element
# Otherwise, implement for loop to process elements individually
OUT = get_rotation(element)
I believe North should be 0 radians, but you should probably verify that this is how Revit treats rotation as well.
Thanks a lot @cgartland.
Regards!