RotateConnectedPartByConnector Method
Rotates a connected fabrication part around the axis of the specified connector.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 22.0.0.0 (22.1.0.0)
Since:  2016 Subscription Release

Syntax

C#
public static void RotateConnectedPartByConnector(
	Document doc,
	Connector conn,
	double axisRotationBy
)
Visual Basic
Public Shared Sub RotateConnectedPartByConnector ( _
	doc As Document, _
	conn As Connector, _
	axisRotationBy As Double _
)
Visual C++
public:
static void RotateConnectedPartByConnector(
	Document^ doc, 
	Connector^ conn, 
	double axisRotationBy
)

Parameters

doc
Type: Autodesk.Revit.DB..::..Document
The document.
conn
Type: Autodesk.Revit.DB..::..Connector
The connected connector of the fabrication part to be rotated.
axisRotationBy
Type: System..::..Double
The angle in radians to rotate by.

Remarks

Attempts to resize rectangular and oval ends if the angle is a multiple of PI/2. Taps cannot be rotated. For rectangular and oval profiles only 90, 180 and 270 degree rotations are valid.

Exceptions

ExceptionCondition
Autodesk.Revit.Exceptions..::..ArgumentException For rectangular and oval parts the axis rotation must be a multiple of PI/2. -or- The connector does not belong to a fabrication part. -or- Connector is not connected. -or- Connector belongs to a fabrication part tap. -or- Fabrication part cannot be rotated because it is either unable to be re-sized or it is too constrained.
Autodesk.Revit.Exceptions..::..ArgumentNullException A non-optional argument was null
Autodesk.Revit.Exceptions..::..InvalidOperationException rotate failed because the fabrication part geometry could not be modified accordingly.

See Also