download Method

Download the specified ChangeSets. If you want to pull and merge ChangeSets from iModelHub to your Briefcase, you should use IModelDb.pullAndMergeChanges instead.

This method creates the directory containing the ChangeSets if necessary. If there is an error in downloading some of the ChangeSets, all partially downloaded ChangeSets are deleted from disk.

download(requestContext: AuthorizedClientRequestContext, changeSets: ChangeSet[], path: string, progressCallback?: (progress: ProgressInfo) => void): Promise<void>

throws IModelHubClientError with IModelHubStatus.UndefinedArgumentError, if one of the required arguments is undefined or empty.

throws ResponseError if the download fails.

Parameter Type Description
requestContext AuthorizedClientRequestContext The client request context
changeSets ChangeSet[] ChangeSets to download. These need to include a download link. See ChangeSetQuery.selectDownloadUrl.
path string Path of directory where the ChangeSets should be downloaded.
progressCallback (progress: ProgressInfo) => void Callback for tracking progress.

Returns - Promise<void>

Defined in

Last Updated: 13 June, 2024