RotateElements Method


Element Transform Utils Rotate Elements Method

Rotates a set of elements about the given axis and angle.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
Syntax
public static void RotateElements(
	Document document,
	ICollection<ElementId> elementsToRotate,
	Line axis,
	double angle
)

Parameters

document Document
The document that owns the elements.
elementsToRotate ICollection ElementId
The set of elements to rotate.
axis Line
The axis of rotation.
angle Double
The angle of rotation in radians.
Exceptions
Exception Condition
ArgumentException The given element id set is empty. -or- One or more elements in elementsToRotate do not exist in the document.
ArgumentNullException A non-optional argument was null
See Also
ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →