Makes a connection between the specified connectors and adds coupling if necessary.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since: 2016
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Parameters
- document
- Type: Autodesk.Revit.DBDocument
The document.
- connector
- Type: Autodesk.Revit.DBConnector
The connector of the fabrication part.
- toConnector
- Type: Autodesk.Revit.DBConnector
The connector of the fabrication part or family to connect to.
Return Value
True if connection succeeded, false otherwise.Remarks
This function does not place and align the fabrication part. Call AlignPartByConnectors before connecting.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.ExceptionsArgumentException | The connector does not belong to a fabrication part. -or- The fabrication part connectors are not aligned, call AlignPartByConnectors to align them. |
Autodesk.Revit.ExceptionsArgumentNullException | A non-optional argument was null |