Revit 2022 API |
FabricationPart..::..AlignPartByConnectors Method |
FabricationPart Class See Also |
Moves fabrication part by one of its connectors and aligns it to another connector.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 22.0.0.0 (22.1.0.0)
Since:
2016
Syntax
C# |
---|
public static bool AlignPartByConnectors( Document doc, Connector partConn, Connector toConn, double axisRotation ) |
Visual Basic |
---|
Public Shared Function AlignPartByConnectors ( _ doc As Document, _ partConn As Connector, _ toConn As Connector, _ axisRotation As Double _ ) As Boolean |
Visual C++ |
---|
public: static bool AlignPartByConnectors( Document^ doc, Connector^ partConn, Connector^ toConn, double axisRotation ) |
Parameters
- doc
- Type: Autodesk.Revit.DB..::..Document
The document.
- partConn
- Type: Autodesk.Revit.DB..::..Connector
The connector of the fabrication part to move and align by.
- toConn
- 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 |