FabricationPartAlignPartByConnectorToConnector Method |
Align a part by its connector to another connector. This will replace the FabricationPart::AlignPartByConnectors method.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic static bool AlignPartByConnectorToConnector(
Document document,
Connector connector,
Connector fixedConnector,
double rotation,
double slope,
FabricationPartJustification justification
)
Public Shared Function AlignPartByConnectorToConnector (
document As Document,
connector As Connector,
fixedConnector As Connector,
rotation As Double,
slope As Double,
justification As FabricationPartJustification
) As Boolean
public:
static bool AlignPartByConnectorToConnector(
Document^ document,
Connector^ connector,
Connector^ fixedConnector,
double rotation,
double slope,
FabricationPartJustification justification
)
static member AlignPartByConnectorToConnector :
document : Document *
connector : Connector *
fixedConnector : Connector *
rotation : float *
slope : float *
justification : FabricationPartJustification -> bool
Parameters
- document Document
-
The document.
- connector Connector
-
The connector of the fabrication part to move by in free space.
- fixedConnector Connector
-
The connector for the fabrication part or family connector to align to.
- rotation Double
-
The rotation 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.
Return Value
Boolean
True if the alignment succeeds, false otherwise and the part will not move from the original position.
ExceptionsException | Condition |
---|
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.
|
ArgumentNullException |
A non-optional argument was null
|
ArgumentOutOfRangeException |
A value passed for an enumeration argument is not a member of that enumeration
|
See Also