>savestate [mode=<none | overwrite>][filename=<filename>]
State files can be used to quickly load a previous state into CFD-Post. State files can be generated manually using a text editor, or from within CFD-Post by saving a state file. The commands required to save to these files from the Command Editor dialog box are described below.
The >savestate
command is used to write
the current CFD-Post state to a file. The >savestate
action supports the following options:
mode = <none | overwrite>
If mode is
none
, the executor creates a new state file, and if the specified file exists, an error will be raised. If mode isoverwrite
, the executor creates a new state file, and if the file exists, it will be deleted and replaced with the latest state information.filename = <filename>
Specifies the path and name of the file that the state is to be written to. If no filename is specified, the
STATE
singleton object will be queried for the filename. If theSTATE
singleton does not exist, then an error will be raised indicating that a filename must be specified.
The following are example >savestate
commands,
and the expected results. If a STATE
singleton
exists, the values of the parameters listed after the >savestate
command replaces the values stored in the STATE
singleton object. For this command, the filename
command parameter value replaces the state filename
parameter value in the STATE
singleton, and
the mode
command parameter value replaces the savestate mode
parameter value in the STATE
singleton.
>savestate
Writes the current state information to the filename specified
in the STATE
singleton. If the mode in the STATE
singleton is none
, and the
filename exists, an error will be returned. If the mode in the STATE
singleton is overwrite
, and
the filename exists, the existing file will be deleted, and the state
information will be written to the file. If the STATE
singleton does not exist, an error will be raised indicating that
a filename must be specified.
>savestate mode=none
Writes the current state information to the file specified in
the STATE
singleton. If the file already exists,
an error will be raised. If the STATE
singleton
does not exist, an error will be raised indicating that a filename
must be specified.
>savestate mode=overwrite
Writes the current state information to the file specified in
the STATE
singleton. If the file already exists,
it will be deleted, and the current state information will be saved
in its place. If the STATE
singleton does not
exist, an error will be raised indicating that a filename must be
specified.
>savestate filename=mystate.cst
Writes the current state information to the mystate.cst file. If the STATE
singleton exists, and the savestate mode
is set to none
, and
the file already exists, the command causes an error. If the savestate mode
is set to overwrite
, and the file already exists, the file will be deleted, and the
current state information will be saved in its place. If the STATE
singleton does not exist, then the system assumes
a savestate mode
of none
, and behave as described above.
>savestate mode=none, filename=mystate.cst
Writes the current state information to the mystate.cst file. If the file already exists, the command causes an error.
>savestate mode=overwrite, filename=mystate.cst
Writes the current state information to the mystate.cst file. If the file already exists, it will be deleted, and the current state information will be saved in its place.