Creating relationships
We want to create a relationship between the Building digital twin and the Floor digital twin. The relationship is defined as Building has Floor. This means that we must add a property of the Relationship type to the source digital twin, which is the Building digital twin.
Create a new version of the model file for a Floor by executing the following steps:
- Create a new folder called
chapter6
under theModels
folder ofSmartbuildingConsoleApp
. Right-click on the Models folder and select Add → New folder. - Create a new
json
file that contains the following code:
{ "@id": "dtmi:com:smartbuilding:Building;1", "@type": "Interface", "@context": "dtmi:dtdl:context;2", "displayName": "Building", "contents": [ { "@type": "...