| Revit 2017 API |
| Document..::..NewElectricalSystem Method (ICollection<(Of <(<'ElementId>)>)>, ElectricalSystemType) |
| Document Class See Also |
Creates a new MEP Electrical System element from a set of electrical components.
Namespace: Autodesk.Revit.Creation
Assembly: RevitAPI (in RevitAPI.dll) Version: 17.0.0.0 (17.0.484.0)
Syntax
| C# |
|---|
public ElectricalSystem NewElectricalSystem( ICollection<ElementId> electComponents, ElectricalSystemType elecSysType ) |
| Visual Basic |
|---|
Public Function NewElectricalSystem ( _ electComponents As ICollection(Of ElementId), _ elecSysType As ElectricalSystemType _ ) As ElectricalSystem |
| Visual C++ |
|---|
public: ElectricalSystem^ NewElectricalSystem( ICollection<ElementId^>^ electComponents, ElectricalSystemType elecSysType ) |
Parameters
- electComponents
- Type: System.Collections.Generic..::..ICollection<(Of <(<'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 nullNothingnullptra null reference (Nothing in Visual Basic).
Exceptions
| Exception | Condition |
|---|---|
| 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 electrical components. |