launch_sherlock#

ansys.sherlock.core.launcher.launch_sherlock(host: str = '127.0.0.1', port: int = 9090, single_project_path: str = '', sherlock_command_args: str = '', year: int | None = None, release_number: int | None = None) Sherlock#

Launch Sherlock and start gRPC on a given host and port.

Parameters:
  • host (str, optional) – IP address to start gRPC on. The default is "127.0.0.1", which is the IP address for the local host.

  • port (int, optional) – Port number for the connection.

  • single_project_path (str, optional) – Path to the Sherlock project if invoking Sherlock in the single-project mode.

  • sherlock_command_args (str, optional) – Additional command arguments for launching Sherlock.

  • year (int, optional) – 4-digit year of the Sherlock release to launch. If not provided, the latest installed version of Sherlock will be launched.

  • release_number (int, optional) – Release number of Sherlock to launch. If not provided, the latest installed version of Sherlock will be launched.

Returns:

The instance of sherlock.

Return type:

Sherlock

Examples

>>> from ansys.sherlock.core import launcher
>>> launcher.launch_sherlock()
>>> from ansys.sherlock.core import launcher
>>> launcher.launch_sherlock(port=9092, year=2024, release_number=1)
>>> from ansys.sherlock.core import launcher
>>> project = "C:\\Default Projects Directory\\ODB++ Tutorial"
>>> launcher.launch_sherlock(port=9092, single_project_path=project)