Revit 2025.3 API
WireConnect |
Connects the wire to other elements.
Namespace: Autodesk.Revit.DB.Electrical
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.3.0.0 (25.3.0.0)
Syntax
public void ConnectTo( Connector startConnectorTo, Connector endConnectorTo )
Public Sub ConnectTo ( startConnectorTo As Connector, endConnectorTo As Connector )
public: void ConnectTo( Connector^ startConnectorTo, Connector^ endConnectorTo )
member ConnectTo : startConnectorTo : Connector * endConnectorTo : Connector -> unit
Parameters
| Exception | Condition |
|---|---|
| ArgumentException | startConnectorTo cannot be connected to a wire, as it is not an electrical connector. -or- endConnectorTo cannot be connected to a wire, as it is not an electrical connector. -or- startConnectorTo or/and endConnectorTo cannot be connected to a wire, as wire can't connect both connectors to same wire or same connector. |
| InvalidOperationException | Cannot connect the wire to the start connector or the end connector. |
See Also