Opening an iModel via the IModelDb class
An IModelDb is used by a service or by the backend of an iModel.js app.
Use IModelDb.open to obtain and open an IModelDb from iModelHub.
Use IModelDb.close to close the local briefcase.
Note that an AccessToken is an argument to IModelDb.open.
Normally, a backend opens an IModelDb at the request of a user who has an AccessToken.
The IModelDb class also provides methods for opening, closing, and accessing a snapshot iModel. A snapshot iModel is a file that is disconnected from iModelHub and therefore does not have a change timeline. Once created, a snapshot iModel is read-only and cannot be changed. This makes snapshot iModels ideal for archival or data transfer purposes.
Use IModelDb.openSnapshot to open an existing snapshot iModel.
Use IModelDb.closeSnapshot to close the snapshot iModel.
Last Updated: 03 June, 2019