startCommand

startCommand: (commandId: string, iModelKey: string, ...args: any[]) => Promise<any>

Start a new instance of an EditCommand on the backend, and then call its onStart method.

@param commandId - the Id of a registered EditCommand on the backend. If commandId === "", the current command is requested to finish but no new EditCommand is started.

@param iModelKey - the key that identifies the iModel that the EditCommand modifies.

@param args - arguments passed to the constructor of the new EditCommand

@returns the value returned by the new EditCommand's onStart method.

@note The current EditCommand (if one is active) is asked to finish and clean up its operation via EditCommand.requestFinish before the new EditCommand is constructed. If it cannot finish immediately, it may return a string that identifies the work it is performing for EditTools.busyHandler to retry and/or display.

Defined in

Last Updated: 17 May, 2024