ansys-mechanical#
CLI tool to run mechanical.
USAGE:
The following example demonstrates the main use of this tool:
$ ansys-mechanical -r 252 -g
Starting Ansys Mechanical version 2025R2 in graphical mode…
ansys-mechanical [OPTIONS]
Options
- -h, --help#
Show this message and exit.
- -p, --project-file <project_file>#
Opens Mechanical project file (.mechdb). Cannot be mixed with -i
- --private-appdata#
Make the appdata folder private. This enables you to run parallel instances of Mechanical.
- --port <port>#
Start mechanical in server mode with the given port number
- --features <features>#
Beta feature flags to set, as a semicolon delimited list. Options: [‘CPython’, ‘MultistageHarmonic’, ‘ThermalShells’]
- -i, --input-script <input_script>#
Name of the input Python script. Cannot be mixed with -p
- --script-args <script_args>#
Arguments to pass into the –input-script, -i. Write the arguments as a string, with each argument separated by a comma. For example, –script-args “arg1,arg2” This can only be used with the –input-script argument.
- --exit#
Exit the application after running an input script. You can only use this command with –input-script argument (-i). The command defaults to true you are not running the application in graphical mode. The
exit
command is only supported in version 2024 R1 or later.
- -s, --show-welcome-screen#
Show the welcome screen, where you can select the file to open. Only affects graphical mode
- --debug#
Show a debug dialog right when the process starts.
- -r, --revision <revision>#
Ansys Revision number, e.g. “251” or “252”. If none is specified, uses the default from ansys-tools-path
- -g, --graphical#
Graphical mode