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)

public static bool AlignPartByConnectors(
Document document,
Connector connector,
Connector toConnector,
double axisRotation
)
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 |
