Running Bentley’s iModel Viewer

Here at Techifide we are passionate about the Built Industry and how technology can improve processes in the field. In this post, we share our first experience with Bentley’s iModel.js, an open-source platform “for creating, querying, modifying, and displaying iModels“. I am using Visual Studio Code, as the project structure is optimized for its use.

Here at Techifide we are passionate about the Built Industry and how technology can improve processes in the field. Our team is well connected and often first to hear about new innovations in software development.

When I discovered Bentley’s iModel.js, an open-source platform “for creating, querying, modifying, and displaying iModels“, I wanted to try it out for myself. I found it to be full of great potential and can already think of ways it can be applied and developed further to bring huge benefits to businesses in the sector.

This post explains how to try this new technology for yourself, using my test example:

I am using Visual Studio Code, as the project structure is optimized for its use.

First of all, check that you are using one of the supported platforms here, and that you have Rush installed. If you don’t, you can install it globally by running the following command:

npm install -g @microsoft/rush

While Rush gets installed, get registered with Bentley:

Register your application at Developer Registration. Select “Agent” from the app type dropdown. For more information, see the section on authorization.

Then add your agent’s identity email as a project participant on your project:

Edit your sample project and add {client_id}@apps.imsoidc.bentley.com as a project participant. If adding the user does not work at first, please wait a few minutes. The identity user is being created in the background, this can take up to ten minutes.

Once you have your credentials, you can download the code from Github: https://github.com/imodeljs/imodeljs-samples

In the interactive-app folder, there are 3 projects:

  • basic-viewport-app
  • ninezone-sample-app
  • simple-viewer-app

Choose one of them and navigate down to the config.json

{chosen-app}/src/common/config.json

You will see something like this:

Remove all comments and set the properties values with the Project Name and iModel Name values you generated at the registration process. Save and run the following command at the route of the project:

rush build

Via terminal, navigate to the project’s folder, in my case:

/interactive-app/ninezone-sample-app

And start your application:

npm start

Now that the app is running, open http://localhost:3000/ in your browser.

Accept the terms of use, then click “Open iModel“. You should see a screen like this:

And let us know about your experience with Bentley’s iModel and any suggestions you have that might help us develop it further…

Techifide

Explore the content from Techifide and delve into a world of tech insights, expert tips, and valuable resources. Stay informed and inspired!

Recent Techi Talks

“Talk a Little Bit About Yourself” in IT Job Interviews

"Can you talk a little bit about yourself?" On the surface, it might appear as if the interviewer is seeking…

6 months ago

Leveraging Brazilian IT Recruitment for Fast Scaling

Leverage Brazilian IT recruitment for rapid scaling! Compelling reasons why contracting software engineers from Brazil can be a game-changer for…

7 months ago

How to prepare for a technical IT interview

Preparing for a technical IT interview requires a combination of technical knowledge, problem-solving skills, and effective communication.

8 months ago

Tips for Candidates

Discover a multitude of invaluable tips to elevate your career to new heights. Uncover the art of crafting an exceptional…

8 months ago

Questions you should ask during a job interview

Engage actively in the conversation and use the opportunity to assess if the company and role align with your career…

8 months ago

What should not be included on a CV?

By omitting unnecessary or unrelated information, you can ensure that your CV remains focused and impactful.

8 months ago

This website uses cookies.