Automate your digital twin

Bentley iTwin and Microsoft PowerBi

Johannes Renner
iTwin.js
4 min readNov 1, 2021

--

iTwin Data in PowerBi

When working with large building models or indeed any infrastructure model, creating and using a digital twin is today’s obvious choice.

A digital twin allows users to federate design models from various data sources. This not only includes BIM models but also information from other sources such as IoT feeds, reality data and continuously updated asset information.

Project managers have to deal with an enormous amount of data and keeping on track can sometimes be a challenge.

As an example, let’s say a large building project, designers and engineers are using various design tools to continuously update their information models. A design manager might want to track how much usable space will be provided once the building is completed. Therefore, an always up-to-date area schedule is required. Traditionally this schedule would have to be generated out of design models linked together, often in their native formats, requiring access to the design tools and extensive knowledge of how to use these. On top of that, they need to know if the model is up to date, is the latest version in use, has the information been validated?

Bentley iTwin

With a Bentley iTwin, it is possible to automatically receive this information from an automatically generated version of your digital twin.

After the initial setup, this requires very little user interaction. All a project manager would need to do is to open their dashboard and click on refresh. PowerBi is perfectly suited to manage that data and provide valuable insights.

Together with Microsoft’s Power Automate, this couldn’t be more accessible. It can send you an email, notifying you when a new iTwin version has been created and trigger the automation flow.

Get twinning

First, you will need to find a suitable model and generate an iTwin from it.

The provided tutorial gives a great overview and is easy to follow. Once that sorted you will need to familiarize yourself with Microsoft’s Power Automate.

All-access

Creating the required access token is a great way to get started. This token can be used for various iTwin applications later. Here’s a simple tutorial on how this can be done:

In Power Automate, create a flow to generate the access token using the client_id and secret code, and you’ll quickly receive an email with the result.

Microsoft Power Automate

Data Flowing

The entire flow is based on the Insights API tutorial.

and, thanks to a no-code approach, requires very little programming skill.

Everything is handled in a few steps and the flow can be reused for other data queries. As you can see in the below image, Authorization is always required and tied to the authorization client you create. Data security is extremely important, and the process (which can seem lengthy) is designed to protect confidential data.

Running the authorization

Reporting — succeeded

success!

Once the extraction process has been completed, it’s time to associate the report with yet another API key, this will allow a user to establish an OData connection with PowerBi.

PowerBi OData feed

With a bit of PowerBi wizardry, dashboards can be created and shared with team members, project participants and clients. This connected workflow does away with the age-old questions, is my data up to date and can I rely on the data I am seeing?

Updates

As soon as design files are updated and validated it is time to create a new version of the digital twin. This process can be initiated manually or automatically. This in return will update the report and populate the dashboard with the latest information. For a more manual approach, a flow can also be triggered directly from the dashboard.

updated dashboard

Happy dashboarding!

--

--