Skip to main content

Python API for Oasys D3PLOT

Project description

The Oasys.D3PLOT package allows Python scripts to control the Oasys LS-DYNA Environment software D3PLOT.

Basic Information

The module uses gRPC to communicate with the D3PLOT executable using the Oasys.gRPC module.

The Python API is currently in Beta testing for version 21.0. If you would like to be involved in testing it then please contact dyna.support@arup.com.

Getting started

As python is running outside D3PLOT, the first thing a script needs to do is to either start an instance of D3PLOT, or to connect to an already running instance of D3PLOT. At the end of the script you should then either disconnect again or terminate the D3PLOT instance.

A skeleton python script to start D3PLOT (Installed at C:\Oasys 21\d3plot21_x64.exe) and then terminate it is:

import Oasys.D3PLOT

connection = Oasys.D3PLOT.start(abspath="C:\\Oasys 21\\d3plot21_x64.exe")

...

Oasys.D3PLOT.terminate(connection)

By default D3PLOT will use port 50054 to communicate with Python and will allocate 25Mb of memory for running scripts. These can be changed by adding port and memory arguments to the start function. e.g:

connection = Oasys.D3PLOT.start(abspath="C:\\Oasys 21\\d3plot21_x64.exe", port=1234, memory=100)

D3PLOT can also be started in batch mode so that the main graphics window is not shown by using a batch argument:

connection = Oasys.D3PLOT.start(abspath="C:\\Oasys 21\\d3plot21_x64.exe", batch=True)

To connect to an instance of D3PLOT that is already running, D3PLOT must currently have been started in a special mode telling it to listen on a port for gRPC messages. This is done by using the -grpc command line argument when starting D3PLOT. e.g:

'C:\\Oasys 21\\d3plot21_x64.exe' -grpc=50054

A skeleton script to connect to D3PLOT and disconnect again would then be:

import Oasys.D3PLOT

connection = Oasys.D3PLOT.connect(port=50054)

...

Oasys.D3PLOT.disconnect(connection)

or if you want to terminate the instance of D3PLOT use terminate instead of disconnect.

Python API

The JS API has been available for several years, is stable and works well, so we have designed the Python API to have the same classes, methods and properties as the JS API. The Python API is currently in beta release and does not yet have any documentation, so for information on the available classes etc please see the Oasys JS API documentation.

However, the following classes are not available:

  • PopupWindow (GUIs not available from Python)

  • Widget (GUIs not available from Python)

  • WidgetItem (GUIs not available from Python)

  • File (use Python i/o instead)

  • Ssh (use python modules instead)

  • XlsxWorkbook (use python modules instead)

  • XlsxWorksheet (use python modules instead)

  • XMLParser (use python modules instead)

  • Zip (use python modules instead)

If an argument in the JS API is an object then the equivalent in Python will be a dict, and if an array in JS, the equivalent in Python will be a list.

More Information

For more details on the Oasys LS-DYNA environment software please see

Project details


Download files

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

Source Distribution

Oasys.D3PLOT-21.0.0b13.tar.gz (32.3 kB view details)

Uploaded Source

Built Distribution

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

Oasys.D3PLOT-21.0.0b13-py3-none-any.whl (61.6 kB view details)

Uploaded Python 3

File details

Details for the file Oasys.D3PLOT-21.0.0b13.tar.gz.

File metadata

  • Download URL: Oasys.D3PLOT-21.0.0b13.tar.gz
  • Upload date:
  • Size: 32.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.4

File hashes

Hashes for Oasys.D3PLOT-21.0.0b13.tar.gz
Algorithm Hash digest
SHA256 9021dea7cfd50b0b09cf6a97ebdf52023e34446879fc70a91bc8363d8636eb30
MD5 a8d84bcdb85988e0a4d34d7cfbe824ca
BLAKE2b-256 34c12bbfb74687155af6d2ecf796982b50f5fd046fa50f9fde4f4ecd302004e4

See more details on using hashes here.

File details

Details for the file Oasys.D3PLOT-21.0.0b13-py3-none-any.whl.

File metadata

File hashes

Hashes for Oasys.D3PLOT-21.0.0b13-py3-none-any.whl
Algorithm Hash digest
SHA256 40ee6a1f630f5270026a3f192901e8cccb12e4069ab6d78a26ce6acaa4e792e0
MD5 15c5b6d0a59fa8e802cb089c7c5e89fb
BLAKE2b-256 9f6dc0791f962158ecc005d1bc7b863b8bc62d32c70964b9f78a0c9fbf558d50

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page