NewElectricalSystem Method (Connector, ElectricalSystemType)
Creates a new MEP Electrical System element from an unused Connector.

Namespace: Autodesk.Revit.Creation
Assembly: RevitAPI (in RevitAPI.dll) Version: 17.0.0.0 (17.0.484.0)

Syntax

C#
public ElectricalSystem NewElectricalSystem(
	Connector connector,
	ElectricalSystemType elecSysType
)
Visual Basic
Public Function NewElectricalSystem ( _
	connector As Connector, _
	elecSysType As ElectricalSystemType _
) As ElectricalSystem
Visual C++
public:
ElectricalSystem^ NewElectricalSystem(
	Connector^ connector, 
	ElectricalSystemType elecSysType
)

Parameters

connector
Type: Autodesk.Revit.DB..::..Connector
The Connector to create this Electrical System.
elecSysType
Type: Autodesk.Revit.DB.Electrical..::..ElectricalSystemType
The System Type of electrical system.

Return Value

If successful a new MEP Electrical System element within the project, otherwise nullNothingnullptra null reference (Nothing in Visual Basic).

Exceptions

ExceptionCondition
Autodesk.Revit.Exceptions..::..ArgumentNullException Thrown when the specified parameter Value is nullNothingnullptra null reference (Nothing in Visual Basic).
Autodesk.Revit.Exceptions..::..ArgumentOutOfRangeException Thrown when the elecSysType parameter Value is out of the range of ElectricalSystemType.
Autodesk.Revit.Exceptions..::..InvalidOperationException Thrown when the electrical system cannot be created by these input connector.

See Also