Revit 2025 API
Fabrication |
Moves fabrication part by one of its connectors and aligns it to another connector.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public static bool AlignPartByConnectors( Document document, Connector connector, Connector toConnector, double axisRotation )
Public Shared Function AlignPartByConnectors ( document As Document, connector As Connector, toConnector As Connector, axisRotation As Double ) As Boolean
public: static bool AlignPartByConnectors( Document^ document, Connector^ connector, Connector^ toConnector, double axisRotation )
static member AlignPartByConnectors : document : Document * connector : Connector * toConnector : Connector * axisRotation : float -> bool
Parameters
- document Document
- The document.
- connector Connector
- The connector of the fabrication part to move and align by.
- toConnector Connector
- The connector of the fabrication part or family to align to.
- axisRotation Double
- Rotation around the direction of connection - angle between width vectors in radians.
Return Value
BooleanTrue if alignment succeeds, false otherwise.

Exception | Condition |
---|---|
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- The fabrication part is connected. |
ArgumentNullException | A non-optional argument was null |
See Also