Revit 2026 API
Fabrication |
Align the part by its connector to a point and rotation in free space.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.0.4.0 (26.0.4.0)
Syntax
public static bool AlignPartByConnector( Document document, Connector connector, XYZ position, double rotation, double rotationPerpendicular, double slope, FabricationPartJustification justification, Transform trf )
Public Shared Function AlignPartByConnector ( document As Document, connector As Connector, position As XYZ, rotation As Double, rotationPerpendicular As Double, slope As Double, justification As FabricationPartJustification, trf As Transform ) As Boolean
public: static bool AlignPartByConnector( Document^ document, Connector^ connector, XYZ^ position, double rotation, double rotationPerpendicular, double slope, FabricationPartJustification justification, Transform^ trf )
static member AlignPartByConnector : document : Document * connector : Connector * position : XYZ * rotation : float * rotationPerpendicular : float * slope : float * justification : FabricationPartJustification * trf : Transform -> bool
Parameters
- document Document
- The document.
- connector Connector
- The connector to align in free space.
- position XYZ
- The position to move the connector to.
- rotation Double
- The rotation in radians.
- rotationPerpendicular Double
- The perpendicular rotation for free placement around the Y axis direction of connection - angle in radians.
- slope Double
- The slope value to flex to match if possible in fractional units (eg.1/50). Positive values are up, negative are down. Slopes can only be applied to fittings, whilst straights will inherit the slope from the piece it is connecting to.
- justification FabricationPartJustification
- The justification to align eccentric parts.
- trf Transform
- Optional alignment transformation matrix, eg. a Trf that describes plan or side elevation.
Return Value
BooleanTrue if the alignment succeeds, false otherwise.
| Exception | Condition |
|---|---|
| ArgumentException | The connector does not belong to a fabrication part. -or- The fabrication part is connected. |
| ArgumentNullException | A non-optional argument was null |
| ArgumentOutOfRangeException | A value passed for an enumeration argument is not a member of that enumeration |
See Also