Python API Oasys.REPORTER documentation

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

For full information and examples of the Python API visit: https://help.oasys-software.com/articles/py_api-21-0

Basic Information

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

Connection methods

start(abspath, args=None, port=50053, memory=25, license=None, debug=False, wait=5)

Start an instance of REPORTER on this machine.

Parameters:
  • abspath (string) – The absolute pathname of the REPORTER executable

  • args (list) – Optional. Any extra arguments to pass onto REPORTER

  • port (integer) – Optional. The gRPC port number used to communicate with REPORTER

  • memory (integer) – Optional. The memory allocated for scripts in REPORTER

  • license (string) – Optional. The location of the license file or server for REPORTER

  • debug (boolean) – Optional. Output debugging messages

  • wait (integer) – Optional. Time to wait (in seconds) for REPORTER to start
    Added in version 21.0.1

Returns:

Connection object used to interact with REPORTER

Return type:

Connection

Example

To start REPORTER (installed at C:\Oasys 21\reporter21_x64.exe):

import Oasys.REPORTER
connection = Oasys.REPORTER.start(abspath="C:\\Oasys 21\\reporter21_x64.exe")
connect(port=50053, memory=25, hostname='localhost', debug=False)

Connect to an instance of REPORTER that is running.

Parameters:
  • port (integer) – Optional. The gRPC port number used to communicate with REPORTER

  • memory (integer) – Optional. The memory allocated for scripts in REPORTER

  • hostname (string) – Optional. The hostname of the machine that REPORTER is running on

  • debug (boolean) – Optional. Output debugging messages

Returns:

Connection object used to interact with REPORTER

Return type:

Connection

Example

To connect to an instance of REPORTER that is listening for gRPC messages on port 50053:

import Oasys.REPORTER
connection = Oasys.REPORTER.connect(port=50053)
disconnect(connection)

Disconnect from the instance of REPORTER that we are connected to and leave REPORTER running.

Example

To disconnect from REPORTER:

Oasys.REPORTER.disconnect(connection)
terminate(connection)

Terminate the instance of REPORTER that we are connected to, closing REPORTER.

Example

To terminate REPORTER:

Oasys.REPORTER.terminate(connection)

Indices and tables