Skip to main content
Version: v5.0

Objects

In your objects.json file, in the "objects" array, define the CAD objects that make up your model. When you define your object, you must make the following external references:

  • Type: Objects are instances of the types you define and must reference the type's id.
  • Properties: The properties that characterize the object must refer to the id of properties you already defined.
  • Relationships: Define any relationships between your object and other objects with the correct relationship type and a reference to their ids.

For more information, see the following "objects" schema with reference to Table 1:

{  ...  "objects": [    {      "id": "integer",      "type": "integer",      "sourceId": "guid",      "properties": [        {          "id": "integer",          "name": "string",          "val": "various data types", //consistent with data type in property definition)          "dVal": "string", //optional, display text value for UI function use        }      ],      "relationships": {        <relationship-type>: `"<integer-id>"`| `["<integer-id>"]`,        ...      }    },    ...  ]}

Table 1: Objects schema

PropertyTypeDescription
"id"NumberGive the object an id which is unique in bimpk.
"type"NumberReference the id of the type the object is an instance of.
"sourceId"GUID/Number/StringThe object's source id in the CAD application.
"properties"Array of ObjectPass an array of property reference objects for each of the object's properties.
"properties.id"NumberCopy the property definition's id you want to reference.
"properties.name"StringCopy the property definition's "name" value you want to reference exactly as it appears.
"properties.val"ManyThe property's value. The value must adhere to a data type set in the property definition's "type" value.
"properties.dVal"StringThe property's display value you want the user to see.
"relationships"ObjectPass property-value pairs that define any relationships the object instance has with other objects in the model, such as a level, room, or a connection to an electrical circuit.
"relationships.relationship-code"String/Array of StringFor each relationship type, use the specific relationship code as the property and a single or array of string integers of the object's id you want to reference.

Sample#

{  "id": 1,  "type": 108,  "sourceId": "dd7a8b4b-7241-4687-87aa-fd7906f76354-0003810b",  "relationships": {    "contained_by_spatial_structure": 53,    "referenced_by_spatial_structure": [      69    ],    "hosts": [      21    ]  },  "properties": [    {      "id": 55,      "name": "BA_NAME",      "val": "Basic Wall::Generic - 8\" Masonry"    },    {      "id": 54,      "name": "System.elementId",      "val": 229643    },    {      "id": 133,      "name": "WALL_STRUCTURAL_SIGNIFICANT",      "val": true    },    ...  ],  "relationships": {    "aggregates" : ["4", "6"],    "aggregated_by" : "20",    "contained_by_spatial_structure":  "20",    "references_in_spatial_structure": ["7", "8"],    ...  }}

Relationships#

In a CAD model, model objects can relate to other objects in direction relationships, such as the following examples:

  • Wall is related to Level 1
  • Furniture is contained by Room

To describe these relationships, define a relationships object with the following property and value:

  • Property: The relationship type you want to define.
  • Value: Depending on the data type required for the relationship type, enter one of the following:
    • An integer id string for the other model object in the relationship
    • An array of integer id strings for each model object in the relationship.

For more information, see the following "relationships" object schema with reference to Table 2:

{  ...  "objects": [    {      ...      "relationships": {        <relationship-type>: `"<integer-id>"`| `["<integer-id>"]`,        ...      }    },    ...  ]}

Table 2: Relationship types and values

Relationship typeData typeModel object's id for the valueRevit example
"aggregates"["id"]Objects your building element aggregatesLevels aggregate Rooms and Spaces.
"aggregated_by""id"Object that aggregates your building elementA Room or Space is aggregated by a Level.
"contains_in_spatial_structure"["id"]Objects your building element containsA Room contains model elements such as walls, windows, and furniture.
"contained_by_spatial_structure""id"Object that contains your building elementA chair is contained in a Room.
"references_in_spatial_structure"["id"]Objects your building element referencesLevel 1 references curtain wall 1 and curtain wall 2.
"referenced_by_spatial_structure"["id"]Objects that reference your building elementCurtain wall 1 is referenced by level 1 and level 2.
"hosts"["id"]Objects your building element hostsA wall that hosts windows and a door.
"hosted_by"["id"]Objects that host your building elementA window is hosted by a wall.
"groups"["id"]Objects your building element groupsA Model Group groups other model elements.
"grouped_by"["id"]Objects that group your building elementA model element is grouped by a Model Group.
"contains_in_system"["id"]Equipment objects your system containsA System that contains Equipment.
"contained_by_system"["id"]System objects that contain your equipment elementEquipment that is contained by a System.
"system_connections"["id"]
"system_connections.system"["id"]System object that contains the equipment elements you want to relateHVAC System
"system_connections.from_equipments"["id"]Source equipment elements in a system you want to relate from in a directional relationship to other equipment elements.Air Handling Unit, Chillers, Boilers
"system_connections.to_equipments"["id"]Target equipment elements in a system you want to relate to in a directional relationship from other equipment elements.VAV Boxes, Fan Coil Units, Exhaust Fans
"from_electrical_device""id"Electric circuit object that contains your electrical device elementConnection from Electrical Devices to Electrical Circuit
"to_electrical_devices"["id"]Electrical device element that connects to your electric circuit elementConnection from Electrical Circuit to Electrical Devices.
"from_electrical_circuit""id"Electric circuit object that contains your electrical device elementConnection from Electrical Circuit to this Electrical Device.
"to_electrical_circuits"["id"]Electrical device elements that are part of your electrical circuitConnection from Electrical Device to Electrical Circuit.
"space_bounded_by"["id"]Boundary elements that bound your spaceRelationship between a Space and its boundaries.
"bounding_space"["id"]Spaces your building element boundsA Building Element that bounds a Space.
"connecting_to"["id"]A source object that relates to your target object in a directional relationshipA Plumbing Fixture connecting to a Pipe
"connected_from"["id"]A target object your source object relates to in a directional relationshipA Pipe connected from a Plumbing Fixture
"MEPconnecting_to"["id"]A source MEP object that relates to your target MEP object in a directional relationshipAn Electrical Outlet connecting to an Electrical Panel
"MEPconnected_from"["id"]A target MEP object your source MEP object relates to in a directional relationshipAn Electrical Panel connected from an Electrical Outlet
"composes"["id"]Aggregation object that your building element is an assembly part ofA building element and the CurtainWall system it is a component part of.
"composed_by"["id"]Building elements that are the assembly parts of your aggregation objectA CurtainWall system and its component parts.
"covers"["id"]Object that physically covers your elements or spacesA Roof covers a Space.
"covered_by"["id"]Elements or spaces your object physically coversA Space is covered by a Roof.
"services_buildings"["id"]System that services your building or buildingsA HVAC System services a building.
"building_serviced_by"["id"]Buildings that are serviced by your systemA building services a HVAC System.