| Revit 2020 API | 
| Zone..::..RemoveSpaces Method | 
| Zone Class See Also | 
Remove a set of existing spaces to the current Zone element.
Namespace: Autodesk.Revit.DB.Mechanical
Assembly: RevitAPI (in RevitAPI.dll) Version: 20.0.0.0 (20.0.0.377)
 Syntax
Syntax
| C# | 
|---|
| public bool RemoveSpaces( SpaceSet spaces ) | 
| Visual Basic | 
|---|
| Public Function RemoveSpaces ( _ spaces As SpaceSet _ ) As Boolean | 
| Visual C++ | 
|---|
| public: bool RemoveSpaces( SpaceSet^ spaces ) | 
Parameters
- spaces
- Type: Autodesk.Revit.DB.Mechanical..::..SpaceSet
 The spaces which want to delete from the current zone element.
Return Value
If successful the current zone element will remove a set of input spaces, otherwise nullNothingnullptra null reference (Nothing in Visual Basic). Exceptions
Exceptions
| Exception | Condition | 
|---|---|
| Autodesk.Revit.Exceptions..::..ArgumentNullException | Thrown when the specified parameter Value is nullNothingnullptra null reference (Nothing in Visual Basic). | 
| Autodesk.Revit.Exceptions..::..InvalidOperationException | Thrown when the input spaces cannot be deleted from current zone element. |