Create Method (Document, IList(ElementId), ElectricalSystemType)


Creates a new MEP Electrical System element from a set of electrical components.

Namespace: Autodesk.Revit.DB.Electrical
Assembly: RevitAPI (in RevitAPI.dll) Version: 18.0.0.0 (18.0.0.420)
Since: 2018

Syntax

C#
public static ElectricalSystem Create(
	Document document,
	IList<ElementId> electComponents,
	ElectricalSystemType elecSysType
)
Visual Basic
Public Shared Function Create ( _
	document As Document, _
	electComponents As IList(Of ElementId), _
	elecSysType As ElectricalSystemType _
) As ElectricalSystem
Visual C++
public:
static ElectricalSystem^ Create(
	Document^ document, 
	IList<ElementId^>^ electComponents, 
	ElectricalSystemType elecSysType
)

Parameters

document
Type: Autodesk.Revit.DB Document
The Document.
electComponents
Type: System.Collections.Generic IList ElementId
The electrical components in this 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 a null reference ( Nothing in Visual Basic) .

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException There should be at least one component that can create the specified circuit type
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 DisabledDisciplineException None of the following disciplines is enabled: Mechanical Electrical Piping.

See Also