Revit 2025.3 API
Connector |
Create a new electrical ConnectorElement.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.3.0.0 (25.3.0.0)
Syntax
public static ConnectorElement CreateElectricalConnector( Document document, ElectricalSystemType electricalSystemType, Reference planarFace )
Public Shared Function CreateElectricalConnector ( document As Document, electricalSystemType As ElectricalSystemType, planarFace As Reference ) As ConnectorElement
public: static ConnectorElement^ CreateElectricalConnector( Document^ document, ElectricalSystemType electricalSystemType, Reference^ planarFace )
static member CreateElectricalConnector : document : Document * electricalSystemType : ElectricalSystemType * planarFace : Reference -> ConnectorElement
Parameters
- document Document
- The document to add the connector to.
- electricalSystemType ElectricalSystemType
- The ElectricalSystemTYpe of the connector.
- planarFace Reference
- The planar face to place the connector on.
Return Value
ConnectorElementThe electrical ConnectorElement.
| Exception | Condition |
|---|---|
| ArgumentException | The reference is not a planar face. -or- document is not a family document. |
| 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