CreateDuctConnector Method (Document, DuctSystemType, ConnectorProfileType, Reference)


Create a new duct ConnectorElement.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 22.0.0.0 (22.1.0.0)
Since: 2013

Syntax

C#
public static ConnectorElement CreateDuctConnector(
	Document document,
	DuctSystemType ductSystemType,
	ConnectorProfileType profileShape,
	Reference planarFace
)
Visual Basic
Public Shared Function CreateDuctConnector ( _
	document As Document, _
	ductSystemType As DuctSystemType, _
	profileShape As ConnectorProfileType, _
	planarFace As Reference _
) As ConnectorElement
Visual C++
public:
static ConnectorElement^ CreateDuctConnector(
	Document^ document, 
	DuctSystemType ductSystemType, 
	ConnectorProfileType profileShape, 
	Reference^ planarFace
)

Parameters

document
Type: Autodesk.Revit.DB Document
The document to add the connector to.
ductSystemType
Type: Autodesk.Revit.DB.Mechanical DuctSystemType
The DuctSystemType of the connector.
profileShape
Type: Autodesk.Revit.DB ConnectorProfileType
The profile shape of the duct.
planarFace
Type: Autodesk.Revit.DB Reference
The planar face to place the connector on.

Return Value

The duct ConnectorElement.

Remarks

Regenerates the document.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException The reference is not a planar face. -or- document is not a family document.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was null
Autodesk.Revit.Exceptions ArgumentOutOfRangeException A value passed for an enumeration argument is not a member of that enumeration
Autodesk.Revit.Exceptions InvalidOperationException Connector creation is not allowed in this family.

See Also