CREATE Operation
The CREATE operation is used to create models and things in the models.
Manifest Configuration
The Create operation has one parameter, the name of the input csv, in its configuration:
{
"operation_type": "CREATE",
"config": {
"object_file": "objects.csv"
}
}
Objects
The CSV file used with the CREATE operation is referred to as the objects
csv file. It is a CSV consisting of a header row and then a row for each entity to generate within the model(s). It has two required columns:
Model_ID|Entity_Name
: identifier of the entity, composed of the site or building model identifier and a unique name for the entity separated by the|
character. Both Model_ID and Entity_Name are case sensitive, but mixing case for either is discouraged (especially as Model_ID is used for file names and not all OS's deal with that). I.e please avoid having both mdl:myBuilding and MDL:myBuilding and/or having both mdl:Room1 and mdl:room1Class
: Brick Collection, Location and Equipment. See DCH support for Brick classes.
Additionally, an arbitrary number of subsequent 'property' columns can be added for any additional, optional metadata to be added to the model.
See allowable character sets and names for restrictions on identifier names, and csv file interpretation for options for specifying classes.
Examples
Example 1: Basic usage to create a site, a building, a room, an Air Handling Unit (AHU) and a Point
Inputs
{
"manifest_version": "1.0.0",
"id_mapping": {
"site_model": "dch:org/test_org/site/test_site",
"building_model": "dch:org/test_org/site/test_site/building/test_building"
},
"operations": [
{
"operation_type": "CREATE",
"config": {
"object_file": "objects.csv"
}
}
]
}
input_csvs/objects.csv
site_model|test_site
Site
building_model|test_building
Building
building_model|test_room
Room
building_model|test_ahu
AHU
Outputs
Zipping those up and running that through the tool will produce two turtle output files:
@prefix brick: <https://brickschema.org/schema/Brick#> .
@prefix site_model: <dch:org/documentation/site/Create_Eg1#> .
site_model:test_site a brick:Site ;
brick:keyValue [ brick:key "mgtool" ;
brick:value "version: 2.0" ],
[ brick:key "mgtool" ;
brick:value "build date: 2024-04-08" ] .
@prefix brick: <https://brickschema.org/schema/Brick#> .
@prefix building_model: <dch:org/documentation/site/Create_Eg1/building/building_eg1#> .
building_model:test_ahu a brick:AHU .
building_model:test_building a brick:Building ;
brick:keyValue [ brick:key "mgtool" ;
brick:value "version: 2.0" ],
[ brick:key "mgtool" ;
brick:value "build date: 2024-04-08" ] .
building_model:test_room a brick:Room .
INFO | Processing model generation manifest at ...\manifest.json
INFO | Importing model generation manifest at ...\manifest.json
INFO | Starting the CREATE operation (...\input_csvs\objects.csv)
INFO | Importing building objects from ...\input_csvs\objects.csv
INFO | Graph of model (building_model): number of building objects that already exist: 0
INFO | Graph of model (building_model): number of building objects created: 4
INFO | Graph of model (building_model): number of building objects updated: 0
INFO | Graph of model (site_model): number of building objects that already exist: 0
INFO | Graph of model (site_model): number of building objects created: 1
INFO | Graph of model (site_model): number of building objects updated: 0
INFO | Writing graph of model (site_model) to ...\script_outputs\site_model.ttl
INFO | Writing graph of model (building_model) to ...\script_outputs\building_model.ttl
INFO | Completed the CREATE operation (...\input_csvs\objects.csv)
Last updated