find_mechanical#

ansys.tools.path.find_mechanical(version=None, supported_versions={191: '19.1', 192: '19.2', 193: '19.3', 194: '19.4', 195: '19.5', 201: '2020R1', 202: '2020R2', 211: '2021R1', 212: '2021R2', 221: '2022R1', 222: '2022R2', 231: '2023R1', 232: '2023R2', 241: '2024R1', 242: '2024R2', 251: '2025R1', 252: '2025R2'})#

Search for the Mechanical path in the standard installation location.

Returns:
mechanical_pathstr

Full path to the executable file for the latest Mechanical version.

versionfloat | str

Version in the float format. For example, 23.1 for 2023 R1. If no version has be found, version is set to “”

Return type:

Union[Tuple[str, float], Tuple[Literal[''], Literal['']]]

Examples

On Windows:

>>> from ansys.tools.path import find_mechanical
>>> find_mechanical()
('C:/Program Files/ANSYS Inc/v231/aisol/bin/winx64/AnsysWBU.exe', 23.1)

On Linux:

>>> find_mechanical()
('/usr/ansys_inc/v231/aisol/.workbench', 23.1)