Command System

Any time you interact with modo, you are executing a ‘’’command’’’. Anything from clicking in a viewport to creating a primitive to saving your work is done through commands. Using commands is also how scripts affect modo, including providing user interfaces and changing the scene itself.

Working With Commands

These articles break down the command system in more detail:

*Command System: Basics covers command classes, the standard syntax format, arguments and datatypes, and command blocks. *Command System: Executing that can appear. *Command System: Executing Scripts looks at how to execute scripts and pass arguments through the command system. *Command System: Querying *Command System: Query Operators examines the use of special operators to modify the values of command arguments before execution. *Command System: Aliases details an advanced feature that allows one command to completely replace another command in the application. *Startup Commands covers adding commands to your config that execute every time the application launches. *CommandService Reference]] explains how to obtain information about the command system through the [[ScriptQuery Overview mechanism.

These articles deal with creating new commands as plug-ins through the SDK:

*Command: Server basics discusses implementing a plug-in command. *Command Help covers adding localized strings, icons and help URLs for command plug-ins. *Command Interface provides an overview of the command object and related interfaces *ILxCommand (index) interface reference

There are a couple of viewports that are particularly useful when working with commands and scripts: the ‘’’Command History’’’ and the ‘’’Event Log’’’.

Command History

The Command History Viewport]] tracks command executions, making it an essential development tool. This viewport also contains the undo stack, a complete command list, a simple scripting interface, and the results of any queries performed from the [[Command History Viewport#Command Entry at the bottom of the viewport.

Event Log

The Event Log Viewport provides information a list of messages from various subsystems. Plug-ins can define their own log subsystems, or can use one of the existing ones. Scripts use a standard scripting subsystem. The log view can be filtered to show only certain subsystems and can be saved to disk.