FabricationPart.AlignPartByInsertionPoint
Description:
Align the part by its insertion point to a point and rotation in free space.
Align the part by its insertion point to a point and rotation in free space.
public static bool AlignPartByInsertionPoint(
Document document,
ElementId partId,
XYZ position,
double rotation,
double rotationPerpendicular,
double slope,
FabricationPartJustification justification,
Transform trf
)
-
documentThe document.
-
partIdThe element identifier of the part to align.
-
positionThe position to move the part's insertion point to.
-
DoublerotationThe rotation in radians.
-
DoublerotationPerpendicularThe perpendicular rotation for free placement around the Y axis direction of connection - angle in radians.
-
DoubleslopeThe 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.
-
justificationThe justification to align eccentric parts.
-
trfOptional alignment transformation matrix, eg. a Trf that describes plan or side elevation.
Return Value
bool
True if the alignment succeeds, false otherwise.
-
The element is not a fabrication part. -or- Not all of the fabrication part's connectors are open.
-
A non-optional argument was null
-
A value passed for an enumeration argument is not a member of that enumeration