Revit 2025 API
Connector |
Create a new duct ConnectorElement.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public static ConnectorElement CreateDuctConnector( Document document, DuctSystemType ductSystemType, ConnectorProfileType profileShape, Reference planarFace, Edge edge )
Public Shared Function CreateDuctConnector ( document As Document, ductSystemType As DuctSystemType, profileShape As ConnectorProfileType, planarFace As Reference, edge As Edge ) As ConnectorElement
public: static ConnectorElement^ CreateDuctConnector( Document^ document, DuctSystemType ductSystemType, ConnectorProfileType profileShape, Reference^ planarFace, Edge^ edge )
static member CreateDuctConnector : document : Document * ductSystemType : DuctSystemType * profileShape : ConnectorProfileType * planarFace : Reference * edge : Edge -> ConnectorElement
Parameters
- document Document
- The document to add the connector to.
- ductSystemType DuctSystemType
- The DuctSystemType of the connector.
- profileShape ConnectorProfileType
- The profile shape of the duct.
- planarFace Reference
- The planar face to place the connector on.
- edge Edge
- One of the edges in the edge loop that defines the connector location on the planar face.
Return Value
ConnectorElementThe duct ConnectorElement.

Exception | Condition |
---|---|
ArgumentException | The reference is not a planar face. -or- document is not a family document. -or- Thrown when the edge does not belong to the face. |
ArgumentNullException | A non-optional argument was null |
ArgumentOutOfRangeException | A value passed for an enumeration argument is not a member of that enumeration |
InvalidOperationException | Connector creation is not allowed in this family. |

Regenerates the document.
See Also