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.1.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.1-py3-none-any.whl (53.7 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for ansys_result_explorer_core-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8d846e0cf3f86335da10d3191d1aa57f492fa398f01c7a929fa294eafb0c208d
MD5 4dfeb2f210e3b8f4c2b0ab0b4c45a3cd
BLAKE2b-256 491c70bb9df6befd2bd7b0cbae1c01cbb90b9f50a4fb0b7ca02ab8f1e316afa1

See more details on using hashes here.

Provenance

The following attestation bundles were made for ansys_result_explorer_core-0.1.1.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.1-py3-none-any.whl.

File metadata

File hashes

Hashes for ansys_result_explorer_core-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8269e42a91066dd21bdf15e619883fa8810515f59174d856e7b74dab047a47ed
MD5 a9c5fcc086251d2c9ed478c66aeba6e0
BLAKE2b-256 b57623f87b7c570f251d3fd7d7ce372357adf3e58b935536d1ea4470a0b20977

See more details on using hashes here.

Provenance

The following attestation bundles were made for ansys_result_explorer_core-0.1.1-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

This release

0.1.1 This release

2 files

0.1.0

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