ConnectTo Method


Connects the wire to other elements.

Namespace: Autodesk.Revit.DB.Electrical
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2015

Syntax

C#
public void ConnectTo(
	Connector startConnectorTo,
	Connector endConnectorTo
)
Visual Basic
Public Sub ConnectTo ( _
	startConnectorTo As Connector, _
	endConnectorTo As Connector _
)
Visual C++
public:
void ConnectTo(
	Connector^ startConnectorTo, 
	Connector^ endConnectorTo
)

Parameters

startConnectorTo
Type: Autodesk.Revit.DBConnector
The connector that the start connector of the wire connects to.
endConnectorTo
Type: Autodesk.Revit.DBConnector
The connector that the end connector of the wire connects to.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException 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.
Autodesk.Revit.ExceptionsInvalidOperationException Cannot connect the wire to the start connector or the end connector.

See Also

ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →