RVTDocs.com

FabricationPart.ConnectAndCouple

Method
Description:
Makes a connection between the specified connectors and adds coupling if necessary.
Remarks:
This function does not place and align the fabrication part. Call AlignPartByConnectors before connecting.
Syntax
public static bool ConnectAndCouple(
	Document document,
	Connector connector,
	Connector toConnector
)
Parameters
Parameter Type Description
document Document The document.
connector Connector The connector of the fabrication part.
toConnector Connector The connector of the fabrication part or family to connect to.
Return Value
Type Description
Boolean True if connection succeeded, false otherwise.
Exceptions
Exception Condition
ArgumentException The connector does not belong to a fabrication part. -or- The fabrication part connectors are not aligned, callAlignPartByConnectorsto align them.
ArgumentNullException A non-optional argument was null