CreateElectricalConnector Method (Document, ElectricalSystemType, Reference)


Create a new electrical ConnectorElement.

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

Syntax

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

Parameters

document
Type: Autodesk.Revit.DBDocument
The document to add the connector to.
electricalSystemType
Type: Autodesk.Revit.DB.ElectricalElectricalSystemType
The ElectricalSystemTYpe of the connector.
planarFace
Type: Autodesk.Revit.DBReference
The planar face to place the connector on.

Return Value

The electrical ConnectorElement.

Remarks

Regenerates the document.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException The reference is not a planar face. -or- document is not a family document.
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsArgumentOutOfRangeException A value passed for an enumeration argument is not a member of that enumeration
Autodesk.Revit.ExceptionsInvalidOperationException Connector creation is not allowed in this family.

See Also