Hello, I’ve found topics here about rotating TextNotes, but i’d like to do the opposite - try and get values of rotated TextNotes.
So far I’ve found that TextNote class in API doesnt have property “Rotation” (it does have Position), but TextNoteOptions class does.
Being a python newb i’m asking what i’m doing wrong here
so far i’m getting AttributeError that there is no such attribute as Rotation…
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
# Import DocumentManager and TransactionManager
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
# Import RevitAPI
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *
# Import ToDSType(bool) extension method
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
#The inputs to this node will be stored as a list in the IN variable.
x = UnwrapElement(IN[0])
rot = []
for i in x:
rot.append(i.Rotation)
#Assign your output to the OUT variable
OUT = rot
also i’ve tried this approach but that’s just freestyling at the moment