Strand7 Software:  In Detail:  API

The Strand7 API

The Strand7 Application Programming Interface (API) allows you to interact with Strand7 via an external computer program. This provides the capability to completely bypass the Strand7 Interactive Environment or to perform specialised functions that are currently not available within Strand7 itself.

The words Application Programming Interface (API), within the Strand7 context, can be defined as follows:

  • The Application is Strand7 (including pre-processing, post-processing and solving functionality).
  • The Interface is a Win32 DLL file called "St7API.DLL". DLL stands for Dynamic Link Library and basically is itself a computer program. However, a DLL cannot run by itself like a program (which usually has the extension EXE) - instead, the DLL provides functions to perform specific tasks, which can be executed by calling them from an external computer program.
  • Programming refers to the fact that the connection to Strand7 is made via an external computer program instead of the more common interaction between a user and the Strand7 Graphical User Interface (GUI). A programmer can develop a program that executes Strand7 functions by calling the functions provided by the API.

Any computer program written in a Windows' supported computer language can utilise the Strand7 API, provided the program is configured to dynamically load Windows DLL files and uses standard Windows calling conventions. It is possible to achieve this in languages such as C, C++, C#, Pascal, Delphi, Visual Basic, FORTRAN, Matlab, Python, and so on. The choice of language used will largely depend upon the programmer's experience and preference rather than any specific performance or compatibility issues. The Strand7 API itself is written using Delphi.

Basic Functionality
In simple terms, the Strand7 API allows you to incorporate Strand7 within your own programs. More specifically it can be used to:
  1. Directly create new Strand7 model files (binary ST7 files) from scratch.
  2. Modify existing Strand7 model files.
  3. Execute the Strand7 solvers.
  4. Extract and process the results of a solution.
Although these functions can be performed by using the Strand7 GUI directly, and data can be transferred between Strand7 and other applications via text-based import/export functions, copy-paste, etc, such an approach can require a significant amount of additional data processing or repetitive, manual procedures when the same operation is to be performed many times. The API approach provides a totally transparent way of interacting with the Strand7 data and repetitive tasks can be easily automated. Importantly, if the format of the Strand7 data files changes, such changes are fully absorbed by the API so that no changes to the external programs are required to use a more up-to-date version of Strand7 or the API.

Future enhancements to the Strand7 API will include API functions to execute any of the Strand7 Tool Options on the main menu.

Target Audience
The Strand7 API will appeal to a wide range of users including:
  • Third-party software developers wishing to develop applications that require FEA for some part of the application. Typical examples might include design software, optimisation software, or software for post-processing Strand7 results.
  • Strand7 users who wish to process their Strand7 results in ways that are currently not supported by the Strand7 post-processing environment, or to automatically generate reports in highly customised formats.
  • Strand7 users who wish to create Strand7 models in a parametric manner or in a manner that lends itself to automated creation via a series of steps.
  • Strand7 users who wish to exchange Strand7 data to and from other applications.
  • Users of other analysis software without pre and post processing capabilities who wish to use the powerful features of the Strand7 pre and post processor but perform their own analysis. For example, a simple Strand7 API program could open a Strand7 file, export the data in the format required by the other analysis software and launch the analysis. Upon completion, the results of the analysis could be configured as contour files for contouring within Strand7.
  • Researchers conducting research into areas that require FEA somewhere in the process. For example, stochastic analysis of structures usually requires the solution of a large sample of models with some statistical spread in parameters. The API can be used to easily develop a program to run all these solutions, collate the results and produce a report.

The API Toolkit
The API Toolkit consists of the following components:
  1. The Dynamic Link Library (St7API.DLL). This provides the interface between the external program and Strand7.
  2. The Header Files. These files allow external programs to communicate with St7API.DLL. The header files define all the constants used and the function calling conventions for each language supported. There is one set of header files for each language (e.g. Delphi, C, C++, FORTRAN, Visual Basic, etc).
  3. Sample applications. To illustrate the use of the API, the full source code for some simple external program is given. Furthermore, the equivalent code is given in a number of languages.
  4. The Strand7 API Manual. This is the reference book (as PDF), which details all the functions available, the calling conventions and the error codes. For each function, a short illustrative programming example is given, showing how the function is used. The illustrative programming example is written using the syntax of various programming languages.
     About Us  |   Contact Us  |   Sitemap  |   中文(简体)网站
     Copyright  |   Disclaimer