Beispiel #1
0
def IsCommand(command_name):
    """Verifies that a command exists in Rhino. Useful when scripting commands
    found in 3rd party plug-ins.
    Parameters:
      command_name = the command name to test
    """
    return rhcommand.IsCommand(command_name)
def IsCommand(command_name):
    """Verifies that a command exists in Rhino. Useful when scripting commands
    found in 3rd party plug-ins.
    Parameters:
      command_name (str): The command name to test
    Returns:
      bool: True if the string is a command or False if it is not a command.
    Example:
      import rhinoscriptsyntax as rs
      cmdname = rs.GetString("Command name to test")
      if cmdname is not None:
          iscmd = rs.IsCommand(cmdname)
          if iscmd:
              print "The", cmdname, "command exists."
          else:
              print "The", cmdname, "command does not exist."
    See Also:
      Command
      InCommand
    """
    return rhcommand.IsCommand(command_name)