CreateElectricalConnector Method (Document, ElectricalSystemType, Reference, Edge)


Create a new electrical ConnectorElement.

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

Syntax

C#
public static ConnectorElement CreateElectricalConnector(
	Document document,
	ElectricalSystemType electricalSystemType,
	Reference planarFace,
	Edge edge
)
Visual Basic
Public Shared Function CreateElectricalConnector ( _
	document As Document, _
	electricalSystemType As ElectricalSystemType, _
	planarFace As Reference, _
	edge As Edge _
) As ConnectorElement
Visual C++
public:
static ConnectorElement^ CreateElectricalConnector(
	Document^ document, 
	ElectricalSystemType electricalSystemType, 
	Reference^ planarFace, 
	Edge^ edge
)

Parameters

document
Type: Autodesk.Revit.DB Document
The document to add the connector to.
electricalSystemType
Type: Autodesk.Revit.DB.Electrical ElectricalSystemType
The ElectricalSystemTYpe of the connector.
planarFace
Type: Autodesk.Revit.DB Reference
The planar face to place the connector on.
edge
Type: Autodesk.Revit.DB Edge
One of the edges in the edge loop that defines the connector location on the planar face.

Return Value

The electrical 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. -or- Thrown when the edge does not belong to the face.
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