Getting Started With iModel.js
Writing an iModel.js application requires the following software:
- Node.js (latest 10.x or 12.x LTS version)
- The installation also includes the
npmcommand line tool.
- Google Chrome
- This is the source code control system for the iModel.js repositories.
The following tools are very helpful and highly suggested for working with iModel.js:
- Visual Studio Code
- This is the recommended editor and debugger for iModel.js applications.
- VS Code also supplies a graphical user interface for working with Git.
- The following VS Code extensions can also be quite helpful:
Note: Skip to step 3, if you already have a Bentley User Account.
Once you have a Bentley User account, you will need to register the application you are about to create so it can access iModelHub.
There are two types of apps you can register:
An interactive application obtains information from an iModel and presents that information in a user interface.
iModel agents and services are apps that have no interactive user interface.
Once you have a registered application, you will need an iModel. Our registration process makes it easy to create a new project in our “iModel Test Drive” organization, populate it with content, and give access to other developers.
The content can be either:
- Bentley supplied example content – Recommended if you are just starting out. Simply select an example from the Project Registration page.
- You can use your own – Follow these steps to format your content into a ‘Snapshot iModel’ (.bim) before proceeding to the Project Registration page below.
_Note: The “iModel Testdrive” organization is intended for developer testing only. See this page for information about administering a CONNECT project in your own organization._
The samples are included in imodeljs-samples. For the complete list of samples see the readme.
Depending on your choice of application type from step 3, you should start out with one of the following:
Basic Viewport App
An example of an interactive application which demonstrates how to:
- Embed an iModel.js viewport into your application to display graphical data.
- Include built-in tools for view navigation such as Pan, Rotate, Zoom.
iModel Query Agent
An example of an agent application which demonstrates how to:
- Listen to changes made to an iModel on the iModelHub.
- Construct a 'Change Summary' of useful information.
- Node Package Manager (npm)
Please see the Community Resources page for the best places to get more help.
Last Updated: 05 December, 2019