Creates new rooms in each plan circuit found in the given level in the given phase.

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

Syntax

C#
public ICollection<ElementId> NewRooms2(
	Level level,
	Phase phase
)
Visual Basic
Public Function NewRooms2 ( _
	level As Level, _
	phase As Phase _
) As ICollection(Of ElementId)
Visual C++
public:
ICollection<ElementId^>^ NewRooms2(
	Level^ level, 
	Phase^ phase
)

Parameters

level
Type: Autodesk.Revit.DB..::..Level
The level from which the circuits are found.
phase
Type: Autodesk.Revit.DB..::..Phase
The phase on which the room is to exist.

Return Value

If successful, a set of ElementIds which contains the rooms should be returned, otherwise the exception will be thrown.

Exceptions

ExceptionCondition
Autodesk.Revit.Exceptions..::..ArgumentOutOfRangeException If the view of the relevant level can not be retrieved.
Autodesk.Revit.Exceptions..::..InvalidOperationExceptionIf the phase is invalid, or regeneration fails at the end of the creation.
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