load_example#

Session.load_example(example_name: str, uncompress: bool = False, root: str | None = None) str#

Load an example dataset.

This method downloads an EnSight session file from a known location and loads it into the current EnSight instance. The URL for the dataset is formed by combining the value given for the example_name parameter with a root URL. The default base URL is provided by Ansys, but it can be overridden by specifying a value for the root parameter.

Parameters:
example_namestr

Name of the EnSight session file (.ens) to download and load.

uncompressbool, optional

Whether to unzip the downloaded file into the returned directory name. The default is False.

rootstr, optional

Base URL for the download.

Returns:
str

Path to the downloaded file in the EnSight session.

Examples

>>> from ansys.pyensight.core import LocalLauncher
>>> session = LocalLauncher().start()
>>> session.load_example("fluent_wing_example.ens")
>>> remote = session.show("remote")
>>> remote.browser()