Method Start
- Namespace
- OpenCAD2D
- Assembly
- OpenCAD2D.Core.dll
Start(string)
Starts a command by its name or alias, ending any command running first as Esc would, as often as it takes (a form waiting at its prompt, then the command it interrupted).
public bool Start(string typed)
Parameters
typedstringThe name or alias: MOVE, M.
Returns
- bool
False, with "Unknown command" in the history, where the registry knows no such command; false, with "Not allowed in the Block Editor.", for a command that leaves the block while the Block Editor is open (BEDIT, XREF, LAYOUT, PLOT and the others).
Start(CadCommand)
Starts a command that is not in the registry, as a host does for the question of a script: its prompts, Esc, the rubber band and the object snaps are those of any command. Leaves LastCommandName as it was, so Enter repeats the last command the user ran. Refused while a command runs.
public bool Start(CadCommand command)
Parameters
commandCadCommandThe command.
Returns
- bool
False where a command was running and nothing was started.
Exceptions
- ArgumentNullException
Thrown when the command is null.