Moves fabrication part by one of its connectors and aligns it to another connector.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.2.0.0 (26.2.0.0)
Syntax
C#
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.
Exceptions
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 |