Commands
Introduction
Commands are programmed operations which can be performed on a dataset. Commands can be used to display datasets in the graphics window, manipulate existing datasets or to generate new datasets. You can even create your own scripted commands to fit you specific needs. Commands are sometimes referred to as command objects because of the way they are connected to the datasets.
In this section:
General
There are two ways to execute a command:
- Right-click the dataset on which you want to operate and select the command in the pop-up menu.
- Select the dataset you want to operate on double click on the command in the Toolbox under Commands. You can also right-click on the command and click Execute.
Two ways to access commands
Commands have two execution modes: Direct and Interactive. If the execution mode is set to Interactive the commands editor with the front menu will be displayed when you execute the command. This allows you to adjust various parameters that define how the command works. Depending on the command, the menu will consist of different input parameters from simple display parameters to complex manipulation options. If the execution mode is set to Direct the command will execute with the last active input parameters for the command. Note that some commands does not require input parameters and will therefore display the underlying code when running it in Interactive mode.
To see if a command is set to Direct or Interactive mode, look behind the command name. If there are ellipsis (...) behind the name, the command is set to Interactive mode.
Documentation on how to use a specific command can be found by clicking the icon in the command menu in Geocap.
Item commands
An item command is associated with a particular object (item) in the project, usually a dataset or a folder. An item command is contained as a member of the item to which it belongs, and is stored along with the project. Therefore, if a project is transferred the item commands will transferred as well. Item commands typically contain settings that pertain specifically to the dataset to which it belongs.
You can see the item commands that belong to an item using one of these methods:
- By right clicking on a dataset or folder and select All commands > Item commands
- By selecting a data set or folder and view the collection called Item Commands in the Toolbox under Commands.
For more information on how to customize the item commands setup see Customizing the Interface.
Schema commands
A schema command is stored with a schema. Read more about Schemas. This means that all datasets or folders using this schema shares these commands.
You can see the schema commands for a schema:
- By right clicking a data set or folder and select All Commands > Schema Commands
- By selecting a dataset or folder and examine the collection called Schema Commands in the Toolbox under Commands.
- By opening the schema menu under Edit > Schemas
For more information on how to customize the schema commands setup see Customizing the Interface.
Shared commands
Shared commands are commands which are shared with all datasets and folders. The set of shared commands is stored in a file called commands in your geocaprc directory, and therefore do not depend on a particular project.
You can see all shared commands:
- By right clicking on any dataset or folder and select All commands > Shared Commands
- By selecting a data set or folder and examine the collection called Shared Commands in the Toolbox under Commands.
For more information on how to customize the shared commands setup see Customizing the Interface.
Default commands
Default commands are executed when you check objects in the project manager using the checkbox to the immediate left of the object. Default commands are either schema commands or item commands that are given the additional role of being a default command.
The default command for a dataset is highlighted in the Toolbox with a green D.
To change a datasets default command:
- Select the dataset in the project.
- Right click the command you want to set as default in the Toolbox.
- Click Set as default command.
Note that a default command may be either a schema command or an item command. If you select a schema comman to be the default command, this will affect all datasets with the same schema uness they are tagged with an item command as the default command.
So - setting an item command as a default command ensures that your dataset will continue to behave as expected (e.g. displaying a thin green line) in the future.