Scripting APIs

The Ansys Dynamic Reporting scripting APIs enable EnSight and other developers to access an Ansys Dynamic Reporting server through scripts written in Python or EnSight's command language. The API includes a large number of functions:

Database Operations

  • Create a new, local database

  • Launch a local server on a local database

  • Stop a local server

  • Attach to a server

  • Query the server version

Data Operations

  • Create a new data item

  • Push data items into the server

  • Get/set the current session information

  • Get/set the current dataset information

There are two primary Ansys Dynamic Reporting Python APIs.

The EnSight Ansys Dynamic Reporting API is built into EnSight and can be called from Python or EnSight command language. It provides a semi-automated interface for exporting data from an EnSight session. It is primarily designed to support EnSight running in an interactive fashion. It supports dynamic triggers, user interface triggering and semi-automatic generation of useful data items.

There is a higher-level API in EnSight related to the use of EnSight state objects and their use in the semi-automated generation of reports. This API is covered in the EnSight Python API website, in the Object API section under 'States: ENS_STATE' and 'Sources: ENS_SOURCE'.

The External Python API is designed to provide more of a lower-level, batch-oriented Ansys Dynamic Reporting API. It can be used from within EnSight or from the EnSight Python system. It is a bit more flexible and lower-level, more complete Ansys Dynamic Reporting interface than the EnSight API. For example, it requires you to perform tasks like image/movie generation and so on. The external python API does not require EnSight to use. It is better suited for EnSight batch mode data item capture.