This directory contains various example scripts demonstrating the usage of the COMcheck API client and its operations for developers.
examples/
├── README.md # This file
├── client/ # API client examples
│ ├── simulation.py # Simulation API workflow examples
│ └── user_functions.py # User-facing function examples
└── project_operations/ # Project operations examples
├── building_area_operations.py # Building area operations
└── envelope_operations.py # Envelope operations
Examples demonstrating COMcheck API client operations.
Demonstrates the simulation workflow for running compliance checks.
What it demonstrates:
start_run_simulation()- Starting a simulationget_simulation_status()- Checking simulation statusget_simulation_result()- Retrieving simulation results
Usage:
python examples/client/simulation.pyDemonstrates user-facing API client functions.
What it demonstrates:
list_projects()- Retrieving project listsget_project()- Getting individual projects- Other user-facing client methods
Usage:
python examples/client/user_functions.pyExamples demonstrating project operations.
Examples for building area operations.
What it demonstrates:
add_building_area_to_project()- Adding new building areasupdate_building_area_in_project()- Updating existing building areas
Usage:
python examples/project_operations/building_area_operations.pyOutput:
testProjectJson/initialProject.jsontestProjectJson/buildingAreaAddedProject.jsontestProjectJson/buildingAreaUpdatedProject.json
Comprehensive examples for all envelope operations including assemblies and nested components. This script demonstrates the complete workflow of adding and updating envelope components in a COMcheck project.
Key Features:
- Location-Aware Updates: Update operations automatically detect whether components are orphaned (ALTERATION projects) or nested in parent assemblies
- Orphaned vs Nested Components:
- Orphaned: Components stored directly in
envelope.component[](ALTERATION projects only) - Nested: Components stored in parent assemblies (e.g.,
roof.skylight[],agWall.window[])
- Orphaned: Components stored directly in
Usage:
python examples/project_operations/envelope_operations.pyOutput Files:
Creates JSON snapshots in testProjectJson/ directory showing project state after each operation.
- Start with client examples (
client/) to understand basic API operations - Use project operations examples (
project_operations/) for end-to-end workflows - Check example output in
testProjectJson/to understand the results
"COM_API_KEY is not set"
- Solution: Create a
.envfile with your API key or set the environment variable
"No projects found"
- Solution: Ensure you have at least one project in your COMcheck account