Using the iTwinModelUploader

Jovita C.
Jovita C.
  • Updated

FME Version

  • FME 2022.1

Introduction

The iTwinModelUploader is an example of a custom transformer that can be created in FME to make calls to interact with an API from an external program to perform operations. In this particular example, the iTwinModelUploader populates an existing Bentley iTwin model from an uploaded file.

In this article, we will cover the steps to gathering the required information to successfully configure the iTwinModelUploader.

Bentley’s iTwin APIs cover a wide range of actions including administrative actions, reporting and analysis, clash detection and validation, and FME can be used to make that interaction.

Have you created your own custom transformer connecting to Bentley iTwins to perform another action? Upload your custom transformer to the FME Hub to share with the community and drop a link to your transformer in the comments below!
  

Requirements

  

Step-by-step Instructions

Part 1: Gathering Requirements to fill the parameters

1. Register Your Application
Login or create an account if you haven’t already. Set the Application name. Choose “Synchronization & Exports” and “Digital Twin Management” under API Associations. Set Allowed Scopes to “Select All” if the tags are not automatically populated.

For Application Type, select “Service” and click Save.

Register your application

2. Save the Client Secret key 
Copy the presented Client Secret and save it somewhere that you can retrieve it reliably such as a text document or email draft. 

You will now see your registered app:

My Apps showing FME Demo and the Client ID

3. Copy the Client ID and Client Email from the App
Click on the new application to show its properties. Copy the Client ID and the Client email somewhere that you can refer to again. 

FME Demo Details

4. Create a new iModel
Go to the iTwin Models page and hit “Create” to make a new blank model. Set the iModel name, set Create Model from to “Empty Model”. Retrieve the copied Client Email and add it to the Project participants field and click Add and press Save. 

Create sample iModel

5. Get the iTwin ID
Under IDs, select Show on the new iModel and save the iTwin ID and Model ID information to a safe place that you can retrieve the information again. 
 

Part 2: Configuring the iTwinModelUploader

1. Add a Creator
In a FME Workbench, start a blank workspace and add a Creator to the canvas.

2. Add the iTwinModelUploader and set the parameters
Add the iTwinModelUploader and connect the Creator to the input. The Creator will kick a feature through to run the iTwinModelUploader. 

  • Specify the File to Upload by browsing your local folder directory.
  • Select a Data Source Type (choose any one)
  • Enter your iTwin Client ID, iTwin Client Secret ID, and iTwin Model ID
  • Choose or Add a Web Connection for the Azure Web Connection
  • Specify the Azure Container for the temporary file upload

  

Additional Resources

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.