Creates a new space element on the given level, at the given location, and assigned to the given phase.
Namespace: Autodesk.Revit.CreationAssembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)
Syntax
C# |
---|
public Space NewSpace( Level level, Phase phase, UV point ) |
Visual Basic |
---|
Public Function NewSpace ( _ level As Level, _ phase As Phase, _ point As UV _ ) As Space |
Visual C++ |
---|
public: Space^ NewSpace( Level^ level, Phase^ phase, UV^ point ) |
Parameters
- level
- Type: Autodesk.Revit.DB..::..Level
The level on which the room is to exist.
- phase
- Type: Autodesk.Revit.DB..::..Phase
The phase in which the room is to exist.
- point
- Type: Autodesk.Revit.DB..::..UV
A 2D point that dictates the location on that specified level.
Return Value
If successful a new Space element within the project, otherwise nullNothingnullptra null reference (Nothing in Visual Basic).
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions..::..ArgumentNullException | Thrown when level, phase or point is nullNothingnullptra null reference (Nothing in Visual Basic). |
Autodesk.Revit.Exceptions..::..InvalidOperationException | Thrown when the space cannot be created. |
Autodesk.Revit.Exceptions..::..ArgumentException | Thrown if the level does not exist in the given document. |
Autodesk.Revit.Exceptions..::..ArgumentException | Thrown if the phase does not exist in the given document. |