get_default_ansys_version#

ansys.mapdl.core.launcher.get_default_ansys_version()#

Search for ansys path within the standard install location.

Returns the version of the latest MAPDL version installed.

Returns:
float or str

Version float. For example, 21.1 corresponds to 2021R1. Returns an empty string when MAPDL cannot be found.

Return type:

Union[float, Literal['']]

Examples

Within Windows

>>> from ansys.mapdl.core.launcher import get_default_ansys_version
>>> get_default_ansys_version()
21.1

Within Linux

>>> get_default_ansys_version()
21.1