Align the part by its insertion point to a point and rotation in free space.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 26.4.0.0 (26.4.0.0)
Syntax
C#
public static bool AlignPartByInsertionPoint(
Document document,
ElementId partId,
XYZ position,
double rotation,
double rotationPerpendicular,
double slope,
FabricationPartJustification justification,
Transform trf
)
Parameters
- document Document
-
The document.
- partId ElementId
-
The element identifier of the part to align.
- position XYZ
-
The position to move the part's insertion point 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
Boolean
True if the alignment succeeds, false otherwise.
Exceptions
See Also
Reference