Implement A New Command

Introduction

Before you write a new command first consider whether or not the command can be implemented as a script. If so, please review the scripting documentation.

Commands

A command is invoked, performs an action, generates a result, and then terminates. [This is different from a drawing mode which provides extensive, user-controlled interaction with a particular element. A drawing mode does not terminate until the user changes the mode. Navigate mode and select mode are examples of drawing modes.] Delete is an example of a command. When you invoke the Delete command Scenome simply deletes the selection and returns control of the software back the user. All Scenome commands function in this manner. If a command needs a bit of data you can implement a property sheet that prompts the user to enter data before the command performs its action. Scenome does not use many prompted commands because users have indicated that they do not like to spend their day being interrupted by dialog boxes.

C++ Commands

By necessity, some commands must be implemented as C++. This is especially important if you need high-performance functionality or if you need a command to produce a very complex result. Scripted commands have some validation but certainly not the same degree provided by a C++ compiler and debugger. You might choose to implement some commands as C++ to take advantage of the compiler and debugger. However the vast majority of Scenome commands - including commands that generate complex results - are implemented via scripts. Scenome currently uses C++ to implement the following commands: