Skip to main content

PyResultExplorer

PyAnsys Python Apache

PyResultExplorer is a Python client library for Ansys Result Explorer, which is a tool to explore and visualize structural simulation results. With PyResultExplorer you can:

  • Launch a new or connect to an existing Result Explorer session
  • Automate and customize your Result Explorer post-processing workflows

Installation

For users

To install PyResultExplorer:

python -m pip install ansys-result-explorer-core

For developers

Installing PyResultExplorer in developer mode allows you to modify the source and enhance it.

Start by cloning this repository:

git clone https://github.com/ansys/pyresultexplorer

Create a fresh-clean Python environment and activate it:

# Create a virtual environment
uv venv

# Activate it in a POSIX system
source .venv/bin/activate

# Activate it in Windows
.venv\Scripts\activate

Install with latest required build system, doc, and testing dependencies:

uv sync --all-groups

The style checks take advantage of pre-commit. You can install it with pre-commit install.

Basic usage

The following code snippet shows how to launch a new Result Explorer instance, create a solution and load a displacement view.

import os
from ansys.result_explorer.core import launch_result_explorer

# Launch a new Result Explorer session
rx = launch_result_explorer()

# Create a solution from an APDL RST file
sol = rx.create_solution(
    name="PyRX Solution",
    file_path=os.path.join("tests", "data", "multiple_connections.rst"),
)

# Create a new workspace and load a displacement view
workspace = rx.create_workspace(name="PyRX Workspace")

views = sol.views
print("Views in solution:")
for v in views:
    print(f" - {v}")

view = next((v for v in views if "Displacement" in v.name), None)
viewport = workspace.assign_view(view=view, wait=True)

# Take a screenshot of the view and save to disk
snapshot_data = viewport.take_snapshot()

print("Saving snapshot to file...")
with open(view.name + ".png", "wb") as image_file:
    image_file.write(snapshot_data)

License

This project is licensed under the Apache 2.0 license agreement. See the LICENSE file for details.

Resources

For general PyAnsys questions, email pyansys-core@synopsys.com.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ansys_result_explorer_core-0.1.0.tar.gz (44.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ansys_result_explorer_core-0.1.0-py3-none-any.whl (53.7 kB view details)

Uploaded Python 3

File details

Details for the file ansys_result_explorer_core-0.1.0.tar.gz.

File metadata

File hashes

Hashes for ansys_result_explorer_core-0.1.0.tar.gz
Algorithm Hash digest
SHA256 76696f6fe847dda4778930ffcddf56c1477d2e0f517502d177be13bf3a4ded8a
MD5 26fe4b553a2e1626e5fed6bdc6b6a40d
BLAKE2b-256 ee20a89839ae094dcb7d9f7f11d951480be7a4e0ee45255c36b565078b9b95b0

See more details on using hashes here.

Provenance

The following attestation bundles were made for ansys_result_explorer_core-0.1.0.tar.gz:

Publisher: ci_cd.yml on ansys/pyresultexplorer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ansys_result_explorer_core-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ansys_result_explorer_core-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 69763e4f9f9d530ab94534fce44e7b59bc4548f5f05023a45962e27fd005f52a
MD5 3d83deddd481838091a6f00b2844c95b
BLAKE2b-256 fc924e10d6af9ba103428267310f89eecdd0dff6fc665fd6579d2545850288d6

See more details on using hashes here.

Provenance

The following attestation bundles were made for ansys_result_explorer_core-0.1.0-py3-none-any.whl:

Publisher: ci_cd.yml on ansys/pyresultexplorer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.1

2 files

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page