CLI for finding and saving path#

This section provides information on how to use the command line interface (CLI) for PyMechanical

find-mechanical#

Use the CLI tool to find the Mechanical version and location.

Parameters#

version: int

Ansys version number.

path: str, optional

Optional path to the Ansys installation directory. eg: “usr/ansys_inc/v251/”

Example#

Get the version and location of the installation directory.

>>> find-mechanical -r 251
>>> find-mechanical -p "usr/ansys_inc/v251/"
find-mechanical [OPTIONS]

Options

-h, --help#

Show this message and exit.

-r, --version <version>#

Ansys version number, such as “242” or “241”. If a version number is not specified, it uses the default from ansys-tools-path.

-p, --path <path>#

Optional path to the Ansys installation directory. If provided, this path will be used instead of the default.

save-ansys-path#

CLI tool to store the path of a solver.

USAGE:

The following example demonstrates the main use of this tool:

$ save-ansys-path –name dyna /path/to/dyna

save-ansys-path [OPTIONS] LOCATION

Options

-h, --help#

Show this message and exit.

--name <name>#

Application name. For example, “mapdl”, “mechanical”, or “dyna”

--allow-prompt#

Allow prompt. Used in case a path is not given or the given path is not valid

Arguments

LOCATION#

Required argument