Creates a new MEP Electrical System element from a set of electrical components.
Namespace: Autodesk.Revit.DB.Electrical
Assembly: RevitAPI (in RevitAPI.dll) Version: 22.0.0.0 (22.1.0.0)
Since: 2018
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
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. |