README
iModel.js Embed API
The iModel.js Embed API allows you to embed an iModel.js application via an iFrame into any "host" web application with a simple request.
The Embed API includes a set of functionality that allows the hosting application to interact with the embedded application. The specific functionality the API exposes is driven by the iModel.js application that is being embedded and therefore support may vary from application to application.
The current feature set includes:
- Support for opening to a specific Context/iModel/Changeset
- Via query params
- Option to turn on/off the iModelIndex page
- Design Review specific
- Interactions with the embedded iModel.js Application
- Unified Selection
- Listen to selection events, more details
- Drive Unified Selection by Element Ids
- Perform full ECSql queries
- To get started with ECSql, visit here
- Get Element Properties
- Viewport functionality
- Drive Zoom by element ids
- Limited Emphasize and Override capabilities
- Unified Selection
- Support for custom messages, event and querystring parameter that can be tailored in a specific embedded application.
Example
There are two samples available in this repository to demonstrate how to use the Embed API.
A basic javascript sample that doesn't use a package manager or bundler is available in the demos folder. The two main files are;
- index.html
- and demo.js
A react-based sample that is started with Create React App and adds the viewer as the main component of the App.