connect device in 3D scenes

Ajinkya 0 Reputation points

I have added my DTDL models and 3D files and also added behavior for my parts with their respective colors. Basically, different parts are connected within one device, and if a specific part exceeds its valid limit, it is shown in red. However, I also want to show the connected part in red as well. bAsically I want to add condition. Can you please help me this?

For example, if the floor has a relationship with the room and we've added a behavior for the room such that if the temperature is greater than 40, then show the room in red. Additionally, I want to show the floor in also red.

Azure Digital Twins
Azure Digital Twins
An Azure platform that is used to create digital representations of real-world things, places, business processes, and people.
224 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sander van de Velde | MVP 31,106 Reputation points MVP

    Hello @ajinkya ,

    welcome to this moderated Azure community forum.

    This pattern is a typical business rule seen in Digital Twins.

    Over a certain relationship, one or more properties of the parent change when a child changes.

    For example: if a room is measuring a fire (very high temperature), the complete floor must be marked as having a fire.

    The easiest solution is:

    • There is a relationship between rooms and floors
    • The child Room has a 'FiredDetected' property
    • The parent Floor has a 'FiredDetected' property
    • When a room.FireDetected property changes, a property change event is emitted
    • There room.FireDetected property change is picked up by custom code
    • That custom code finds the parent Floor via the relationship (via a graph query)
    • For this parent Floor, all (sibling) Room children are checked (via a graph query) for their 'FiredDetected' property
    • The parent Floor 'FiredDetected' property is set to true when any room has a fire detected. Else, the property is set to false
    • Set the color of the floor according to the Floor 'FiredDetected' property

    Notice this can be repeated for 'any floor within a building' has a fire detected.

    Regarding creating the business rules, this can be coded using Azure Functions or via low code solution using Logic Apps.

    Because a lot of property change events are triggered, you need to be smart to prevent unnecessary function execution (normally, the function to change a Building property is not interested in Room property changes).

    If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.