Building Area Operations¶
Functions for adding, updating, and removing building areas in a COMcheck project.
project_building_area_operations
¶
Project Building Area Operations.
add_building_area_to_project
¶
Add a new building area to the project using buildingAreaListManager.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
ComBuilding
|
The project object to modify |
required |
new_building_area
|
WholeBldgUse
|
The building area object to add |
required |
Returns:
| Type | Description |
|---|---|
ComBuilding
|
Updated project object with the building area added |
Source code in comcheck_api/project_operations/project_building_area_operations.py
update_building_area_in_project
¶
Update an existing building area in the project using buildingAreaListManager.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
ComBuilding
|
The project object to modify |
required |
building_area_key
|
str
|
The key of the building area to update |
required |
updates
|
dict[str, Any] | WholeBldgUse
|
Partial updates (dict) or full building area object to apply |
required |
Returns:
| Type | Description |
|---|---|
ComBuilding
|
Updated project object with the building area updated |
Source code in comcheck_api/project_operations/project_building_area_operations.py
remove_building_area_from_project
¶
Remove an existing building area in the project.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
ComBuilding
|
The project object to modify |
required |
building_area_key
|
str
|
The key of the building area to update |
required |
Returns:
| Type | Description |
|---|---|
ComBuilding
|
Updated project object with the building area removed |
Source code in comcheck_api/project_operations/project_building_area_operations.py
get_building_area_keys_from_project
¶
Extract valid building area identifiers from a COMcheck project.
This function retrieves the lighting.wholeBldgUse field from the provided
project and returns a list of dictionaries containing each area's unique key
and description.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
ComBuilding
|
The COMcheck project object. |
required |
Returns:
| Type | Description |
|---|---|
list[dict]
|
list[dict]: A list of dictionaries with the shape: { "key": , "areaDescription": } |