get_osl_exec#

ansys.optislang.core.utils.get_osl_exec(osl_version: int | str | None = None) Tuple[int, Path] | None#

Get the path to the optiSLang executable file.

Parameters:
osl_versionOptional[Union[int, str]], optional

optiSLang version in a three-digit format like this 221. The default is None, in which case the latest installed version is used.

Returns:
Optional[Tuple[int, pathlib.Path]]

optiSLang version and path to the corresponding executable file, if it exists. If both Ansys and standalone installations are present, the latest Ansys installation is returned. If no executable file is found for a specified version, None is returned.

Raises:
NotImplementedError

Raised when the operating system is not supported.