Executes an editor command.
.executeCommand(/*String*/ commandName, [parameters])
The name of the command to be executed. This must be a valid command name. More information on editor commands is available here.
Some command have parameters. Information on the parameters for editor commands is available here.
// Enable the grid.
editor.executeCommand('enableGrid', true);
...
// Start a line drawing operation.
editor.executeCommand('draw_line');