RotateElements Method


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

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2012

Syntax

C#
public static void RotateElements(
	Document document,
	ICollection<ElementId> elementsToRotate,
	Line axis,
	double angle
)
Visual Basic
Public Shared Sub RotateElements ( _
	document As Document, _
	elementsToRotate As ICollection(Of ElementId), _
	axis As Line, _
	angle As Double _
)
Visual C++
public:
static void RotateElements(
	Document^ document, 
	ICollection<ElementId^>^ elementsToRotate, 
	Line^ axis, 
	double angle
)

Parameters

document
Type: Autodesk.Revit.DBDocument
The document that owns the elements.
elementsToRotate
Type: System.Collections.GenericICollectionElementId
The set of elements to rotate.
axis
Type: Autodesk.Revit.DBLine
The axis of rotation.
angle
Type: SystemDouble
The angle of rotation in radians.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException The given element id set is empty. -or- One or more elements in elementsToRotate do not exist in the document.
Autodesk.Revit.ExceptionsArgumentNullException 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 →