NewSpaces2 Method (Phase, Int32)


Creates a set of new unplaced spaces on a given phase.

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

Syntax

C#
public ICollection<ElementId> NewSpaces2(
	Phase phase,
	int count
)
Visual Basic
Public Function NewSpaces2 ( _
	phase As Phase, _
	count As Integer _
) As ICollection(Of ElementId)
Visual C++
public:
ICollection<ElementId^>^ NewSpaces2(
	Phase^ phase, 
	int count
)

Parameters

phase
Type: Autodesk.Revit.DB Phase
The phase in which the spaces are to exist.
count
Type: System Int32

Return Value

If successful, a set of ElementIds of new unplaced spaces are be returned, otherwise a null reference ( Nothing in Visual Basic) .

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException Thrown if the phase 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 →