18.1. Overview of Command Actions

Command action statements are used to force CFD-Post to undertake a specific task, usually related to the input and output of data from the system. You can use command action statements in a variety of areas:

  • You can enter command action statements into the Tools > Command Editor dialog box. All such actions must be preceded with the > symbol.

    For details on the Command Editor dialog box, see Command Editor. Additional information on editing and creating graphics objects using the CFX Command Language in the Command Editor dialog box is available in CFX Command Language (CCL) in CFD-Post.

  • Command actions also appear in session files (where they are also preceded by the > character).

  • When running CFD-Post in Line Interface mode, the CFX> command prompt is shown in a Windows Command Prompt or UNIX shell. All the actions described in this section along with some additional commands can be entered at the command prompt. You do not have to precede commands with the > symbol when running in Line Interface mode. Additional information on using Line Interface mode is available in Line Interface Mode.


Note:  In addition to command action statements, CCL takes advantage of the full range of capabilities and resources from an existing programming language, Perl. Perl statements can be embedded in between lines of simple syntax, providing capabilities such as loops, logic, and much, much more with any CCL input file. These Power Syntax commands are preceded by the ! symbol. Additional information on using Power Syntax in the Command Editor dialog box is available in Power Syntax in Ansys CFX in the CFX Reference Guide.


Many actions require additional information to perform their task (such as the name of a file to load or the type of file to create). By default, these actions get the necessary information from a specific associated CCL singleton object. For convenience, some actions accept a few arguments that are used to optionally override the commonly changed object settings. If multiple arguments for an action are specified, they must be separated by a comma (,). Lines starting with the # character are not interpreted and can be used for comments.

For example, all the settings for >print are read from the HARDCOPY: object. However, if you desire, you can specify the name of the hardcopy file as an argument to >print. The following CCL example demonstrates this behavior of actions:

# Define settings for printing
HARDCOPY:
   Hardcopy Format= jpg
   Hardcopy Filename = default.jpg
   Image Scale = 70
   White Background = Off
END
#Create an output file based on the settings in HARDCOPY
>print
#Create an identical output file with a different filename.
>print another_file.jpg