ElementTransformUtils.RotateElement
Description:
Rotates an element about the given axis and angle.
Rotates an element about the given axis and angle.
-
documentThe document that owns the elements.
-
elementToRotateThe element to rotate.
-
axisThe axis of rotation.
-
DoubleangleThe angle of rotation in radians.
public void RotateColumn(Autodesk.Revit.DB.Document document, Autodesk.Revit.DB.Element element)
{
XYZ point1 = new XYZ(10, 20, 0);
XYZ point2 = new XYZ(10, 20, 30);
Line axis = Line.CreateBound(point1, point2);
ElementTransformUtils.RotateElement(document, element.Id, axis, Math.PI / 3.0);
}
-
The element elementToRotate does not exist in the document
-
A non-optional argument was null