Description
If you want to rotate an element (but not passing a value to the rotate parameter) you can use the transform util provided by Revit. Just make sure that the passed line is an Autodesk.Revit.DB.Line
Solution
import re; clr.AddReference("RevitAPI"); from Autodesk.Revit.DB import ElementId as DBElementId from Autodesk.Revit.DB import ElementTransformUtils as DBElementTransformUtils clr.AddReference("RevitServices") import RevitServices from RevitServices.Persistence import DocumentManager from RevitServices.Transactions import TransactionManager doc = DocumentManager.Instance.CurrentDBDocument TransactionManager.Instance.EnsureInTransaction(doc) #_line is an Autodesk.Revit.DB.Line element def rotateElement(element, _line, _angle): try: DBElementTransformUtils.RotateElement(doc, DBElementId(element.Id), _line, _angle); return element; except: return "Error Rotating"; OUT = rotateElement(IN[0], IN[1])