IModelsHandler Class


Handler for managing HubIModel instances. Use IModelHubClient.IModels to get an instance of this handler.

note Use IModelHubClient.IModel for the preferred single iModel per context workflow.


Name Description
create(requestContext: AuthorizedClientRequestContext, contextId: string, name: string, createOptions?: IModelCreateOptions): Promise<HubIModel> Create an iModel from given seed file.  
delete(requestContext: AuthorizedClientRequestContext, contextId: string, iModelId: GuidString): Promise<void> Delete an iModel with specified id from a context.  
download(requestContext: AuthorizedClientRequestContext, iModelId: GuidString, path: string, progressCallback?: (progress: ProgressInfo) => void): Promise<void> Method to download the seed file for iModel.  
get(requestContext: AuthorizedClientRequestContext, contextId: string, query: IModelQuery = new IModelQuery()): Promise<HubIModel[]> Get iModels that belong to the specified context.  
getInitializationState(requestContext: AuthorizedClientRequestContext, iModelId: GuidString): Promise<InitializationState> Get the InitializationState for the specified iModel.  
update(requestContext: AuthorizedClientRequestContext, contextId: string, imodel: HubIModel): Promise<HubIModel> Update iModel's name and/or description  

Defined in

Last Updated: 08 January, 2020