NewSpace Method (Level, UV)


Creates a new space element on the given level at the given location.

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

Syntax

C#
public Space NewSpace(
	Level level,
	UV point
)
Visual Basic
Public Function NewSpace ( _
	level As Level, _
	point As UV _
) As Space
Visual C++
public:
Space^ NewSpace(
	Level^ level, 
	UV^ point
)

Parameters

level
Type: Autodesk.Revit.DBLevel
The level on which the space is to exist.
point
Type: Autodesk.Revit.DBUV
A 2D point that dictates the location on that specified level.

Return Value

If successful the new space element is returned, otherwise a null reference (Nothing in Visual Basic).

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentNullException Thrown when level or point is a null reference (Nothing in Visual Basic).
Autodesk.Revit.ExceptionsInvalidOperationException Thrown when the space cannot be created.
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 →