method getCommandById

command getCommandById(string id);

Argumente

Zurückgegebener Wert

This method returns a command object for the given ID, or null if one is not found.
function onSample()
{
    var command = scene.getCommandById("myCmdId");
    if (command)
    {
        // Disable this command.
        command.disabled = true;
    }
}