Scripting API

Previous Next

Scripting API Overview

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

Database operations

Data operations

The APIs

There are two primary Nexus Python APIs. 

The EnSight Nexus 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 Nexus 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 Nexus 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 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.