This method returns a command object for the given ID, or null if one is not found.
function onSample()
{
var commandGroup = scene.getCommandGroupById("myCmdGrp");
if (commandGroup)
{
var command = commandGroup.getCommandById("cmdFoo1");
if (command)
{
commandGroup.removeCommand(command);
}
}
}