Launcher#

class ansys.workbench.core.workbench_launcher.Launcher#

Launch a Workbench server on a local or remote machine.

Note that launching a server on a remote Linux machine, or on a remote Windows machine from a Linux machine, is not supported.

Raises:
Exception

If the wmi module on Windows, or the ctypes module on Linux, is not available

Overview#

launch

Launch PyWorkbench server on the local or a remote computer.

exit

End the launched Workbench server.

Import detail#

from ansys.workbench.core.workbench_launcher import Launcher

Method detail#

Launcher.launch(version, show_gui=True, server_workdir=None, host=None, username=None, password=None)#

Launch PyWorkbench server on the local or a remote computer.

Parameters:
versionstr

Workbench version to launch. It must be a three-digit version, such as 242 or later.

show_guibool, default: True

Whether to launch Workbench in UI mode.

server_workdirstr, default: None

Path to a writable directory on the server. The default is None, in which case the user preference for the Workbench temporary file folder is used.

hoststr, default: None

Name or IP address of the server. The default is None, which launches Workbench on the local computer.

usernamestr, default: None

User’s login name on the server. The default is None, which launches Workbench on the local computer.

passwordstr, default: None

User’s password on the server. The default is None, which launches Workbench on the local computer.

Raises:
Exception

If the Ansys version string is invalid. If the host is given but the username or password is missing. If remote launching is attempted from or onto a Linux machine If the wmi service on the remote Windows machine fails If the Ansys installation is not found.

Launcher.exit()#

End the launched Workbench server.