NewRooms2 Method (Level)


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

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

Syntax

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

Parameters

level
Type: Autodesk.Revit.DBLevel
The level from which the circuits are found.

Return Value

If successful, a set of ElementIds which contains the rooms created should be returned, otherwise a null reference (Nothing in Visual Basic).

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentOutOfRangeException If the view of the relevant level can not be retrieved.
Autodesk.Revit.ExceptionsInvalidOperationExceptionIf the phase is invalid, or regeneration fails at the end of the creation.
Autodesk.Revit.ExceptionsArgumentExceptionThrown if the level does not exist in the given document.

See Also

ArchiLabs

Stop fighting Revit automation.

Build repeatable BIM design and documentation workflows with scripts, data, and AI in one place, without wrestling brittle one-off automations.

Try ArchiLabs →