API Reference > imodeljs-frontend > SelectionSet > SelectionTool > onRestartTool onRestartTool Method Called when an external event may invalidate the current tool's state. Examples are undo, which may invalidate any references to elements, or an incompatible active view change. The active tool is expected to call installTool with a new instance, or exitTool to start the default tool. const tool = new MyPrimitiveTool(); if (!tool.run()) this.exitTool(); // Don't leave current instance active if new instance rejects install... onRestartTool(): void Returns - void Defined in core/frontend/src/tools/SelectTool.ts Line 601 Last Updated: 12 June, 2024