defaults command_file

The DEFAULTS COMMAND_FILE command is used to specify what happens when an error is encountered while reading a command file.

Format:

 
defaults command_file
on_error =
error_action
echo_commands =
on.off
update_screen =
on/off

Example:

 
defaults command_file &
on_error =
continue_command &
echo_commands =
on &
update_screen =
on

Description:

 
Parameter
Value Type
Description
echo_commands
On_off
Specifies whether or not Adams View will echo commands while executing command files.
update_screen
On_off
Specifies whether Adams View will update the screen while executing command files.

Extended Definition:

1. The three legal values for the on_error parameter are CONTINUE_COMMAND, IGNORE_COMMAND, and ABORT_FILE. CONTINUE_COMMAND continues processing the line as if it were typed interactively. This can be dangerous if there is no correction later on the line, since the parser will keep issuing errors until a correction is made. The errors may continue beyond the end of the line, even to the end of the file, if carriage-returns are invalid. CONTINUE_COMMAND should only be used if the command file is a literal recording of your key strokes, complete with backspaces, or other corrections, after mistakes. IGNORE_COMMAND ignores the line the error was found on, and starts processing the next line as a new command. The parser can usually recover and execute subsequent commands in the file. If subsequent commands depend on the results of the invalid command, however, they may fail or give unexpected results. ABORT_FILE immediately closes all the command files and returns to interactive input. This is the most conservative setting, since it guarantees subsequent commands will cause no further errors or unexpected results.
IGNORE_COMMAND is the default action.
2. If you select ON, for the echo_commands, the default, the commands will scroll through the Dialog area and will be recorded as comments in the log file. If you select OFF, the commands will not be displayed or logged. As a result, the command file will execute more quickly, and the log file will be smaller.
3. For the update_screen parameter, if you select ON, the default, Adams View will update the display after each command. If ECHO_COMMANDS is ON, you will see commands scrolling through the Dialog area. If the command file changes the displayed geometry or plots, you will see the display change as the commands are executed. If you select OFF, the display will not be updated until the command file is finished executing. You will only see the final result. If the command file normally generates many screen updates, especially of solid or shaded views, selecting OFF will make it execute more quickly.

Tips:

1. The ON_ERROR parameter is useful to set modes for debugging command files.