Creates a new Zone element.

Namespace: Autodesk.Revit.Creation
Assembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)

Syntax

C#
public Zone NewZone(
	Level level,
	Phase phase
)
Visual Basic
Public Function NewZone ( _
	level As Level, _
	phase As Phase _
) As Zone
Visual C++
public:
Zone^ NewZone(
	Level^ level, 
	Phase^ phase
)

Parameters

level
Type: Autodesk.Revit.DB..::..Level
The level on which the Zone is to exist.
phase
Type: Autodesk.Revit.DB..::..Phase
The associative phase on which the Zone is to exist.

Return Value

If successful a new Zone 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..::..InvalidOperationException Thrown when the electrical system cannot be created by these input phase and level.
Autodesk.Revit.Exceptions..::..ArgumentExceptionThrown if the level does not exist in the given document.
Autodesk.Revit.Exceptions..::..ArgumentExceptionThrown if the phase does not exist in the given document.

See Also