Moves fabrication part by one of its connectors and aligns it to another connector.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since: 2016
Syntax
C# |
---|
public static bool AlignPartByConnectors( Document document, Connector connector, Connector toConnector, double axisRotation ) |
Visual Basic |
---|
Public Shared Function AlignPartByConnectors ( _ document As Document, _ connector As Connector, _ toConnector As Connector, _ axisRotation As Double _ ) As Boolean |
Visual C++ |
---|
public: static bool AlignPartByConnectors( Document^ document, Connector^ connector, Connector^ toConnector, double axisRotation ) |
Parameters
- document
- Type: Autodesk.Revit.DB..::..Document
The document.
- connector
- Type: Autodesk.Revit.DB..::..Connector
The connector of the fabrication part to move and align by.
- toConnector
- Type: Autodesk.Revit.DB..::..Connector
The connector of the fabrication part or family to align to.
- axisRotation
- Type: System..::..Double
Rotation around the direction of connection - angle between width vectors in radians.
Return Value
True if alignment succeeds, false otherwise.
Exceptions
Exception | Condition |
---|---|
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- The fabrication part is connected. |
Autodesk.Revit.Exceptions..::..ArgumentNullException | A non-optional argument was null |