Creates electrical load areas on all the empty plan circuits of the given level.
Namespace: Autodesk.Revit.DB.Electrical
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.3.0.0 (25.3.0.0)
Syntax
C#
public static ISet<ElementId> CreateElectricalLoadAreas( Document doc, ElementId levelId, ElementId phaseId )
Parameters
- doc Document
- The document where the created electrical load areas are.
- levelId ElementId
- The base level on which the created electrical load areas exist.
- phaseId ElementId
- The associated phase in which the created electrical load areas exist.
Return Value
ISet<ElementId>The created electrical load areas.
Exceptions
Exception | Condition |
---|---|
ArgumentException | doc is not a project document. -or- The ElementId levelId is not a Level. -or- The id does not represent a valid phase. |
ArgumentNullException | A non-optional argument was null |
InvalidOperationException | The document is in failure mode: an operation has failed, and Revit requires the user to either cancel the operation or fix the problem (usually by deleting certain elements). |
ModificationForbiddenException | The document is in failure mode: an operation has failed, and Revit requires the user to either cancel the operation or fix the problem (usually by deleting certain elements). -or- The document is being loaded, or is in the midst of another sensitive process. |
ModificationOutsideTransactionException | The document has no open transaction. |