create Method

Upload a ChangeSet file. If you want to push your changes to iModelHub, use IModelDb.pushChanges instead. This method is only a part of that workflow.

ChangeSets have to be uploaded in a linear order. If another user is uploading, or changeSet.parentId does not point to the latest ChangeSet on iModelHub, this method will fail. User will have to download all of the newer ChangeSets, merge them into their Briefcase and calculate a new ChangeSet id.

create(requestContext: AuthorizedClientRequestContext, iModelId: GuidString, changeSet: ChangeSet, path: string, progressCallback?: (progress: ProgressInfo) => void): Promise<ChangeSet>

throws IModelHubStatus.BriefcaseDoesNotBelongToUser if Briefcase specified by changeSet.briefcaseId belongs to another user.

throws IModelHubStatus.AnotherUserPushing if another user is currently uploading a ChangeSet.

throws IModelHubStatus.PullIsRequired if there are newer ChangeSets on iModelHub, that need to be downloaded and merged, before upload is possible.

throws IModelHubStatus.ChangeSetAlreadyExists if a ChangeSet with this id already exists. This usually happens if previous upload attempt has succeeded.

throws IModelHubStatus.ChangeSetPointsToBadSeed if changeSet.seedFileId is not set to the correct file id. That file id should match to the value written to the Briefcase file. See IModelDb.setGuid.

throws Common iModelHub errors

Parameter Type Description
requestContext AuthorizedClientRequestContext The client request context
iModelId GuidString Id of the iModel. See HubIModel.
changeSet ChangeSet Information of the ChangeSet to be uploaded.
path string Path of the ChangeSet file to be uploaded.
progressCallback (progress: ProgressInfo) => void Callback for tracking upload progress.

Defined in

Last Updated: 13 October, 2019