Scripting API#
The Ansys Dynamic Reporting scripting APIs enable EnSight and other developers to access an ADR Nexus 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
The APIs#
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, GUI 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 the user to perform tasks like image/movie generation, etc. The external python API does not require EnSight to use. It is perhaps better suited for EnSight batch mode data item capture.
The ADR Nexus server includes an internal REST API that has not yet been finalized. It will be documented at that point for application developers using other languages. Ansys provides Python API wrappers for the API with the core EnSight product.