FEMtools Script and API
Why Scripting?
Most mature and powerful applications today provide some level of scripting. This is because no matter how much functionality an application provides, and no matter how many options, there are always situations where users find themselves constrained by what developers chose to include. It can be very expensive to extend an application's functionality between releases, and to provide bug fixes and customization in fast and flexible manner.
Scripting allows users to create their own solutions and customizations based on the core functionality provided by the application.
What is FEMtools Script?
FEMtools Script is a rapid scripting language that is a standard part of FEMtools Framework and was first introduced in version 2.0. Its main purpose is to provide a means to customize or extend the software. Using FEMtools Script, a user can write a script to do just about any imaginable task.
At the heart of FEMtools Script is MathBasic, a proprietary scripting engine developed by Dynamic Design Solutions. The language syntax is derived from the Basic programming language, so a user does not need to learn another programming language than he probably already knows. MathBasic provides extensions of the Basic programming language to make it more suitable for mathematical programming.
FEMtools API
The FEMtools API is a library of functions that can be used from a script written in FEMtools Script to access the FEMtools database (FEA data, test data) or pilot external CAE or test tools.
Together with the support for math programming provided by FEMtools Script this provides all the tools to develop entire applications on top of the FEMtools environment. New ideas or specific needs can be quickly translated into working scripts. You will be writing and running scripts within hours.
Advantages of using FEMtools Script
FEMtools Script and the API provide all the power that one needs to develop entire applications on top of the FEMtools environment. With functions that provide access to the FEMtools internal database, support for math programming, and reusing components like data interfaces, graphics viewer, solvers etc, a script programmer can very quickly translate his ideas into working scripts.
Further advantages of using FEMtools Script are:
- Faster development - Programming of new functionality is done outside the core FEMtools source code. No complete builds of the entire FEMtools program are required to use new additions. Script programmers can focus on their own source code only and on the interaction with the FEMtools database.
- Solid code - The programming language and API provide a layer between the raw FEMtools database and applications. This reduces the risk of corrupting the database.
- Development through partnerships - By using a common development platform and by working outside of the FEMtools source code, it becomes easier to develop new functions in collaboration with partners or subcontractors.
- Easy to use and learn - If you already know Basic, Visual Basic or Visual Basic for Applications, FEMtools Script will be very familiar.
Specifications
FEMtools Script is an extension of the Basic programming language to make it more suitable for mathematical programming. It is a lighter language than Visual Basic because only functions are included that are useful for development of FEMtools related applications. This eliminates all unnecessary overhead. Furthermore, script programs run as compiled byte-code for faster execution.
In addition to standard math functions found in most Basic implementation, FEMtools Script provides the following
- Functions to exchange matrices with external software like e.g. Matlab, MS Excel, via file transfer or OLE automation.
- Advanced functions for mathematical programming (array operators and functions, complex numbers, sparse matrices, regular expressions, ...).
- Functions for launching and controlling external tools.
- Functions for user interface development (graphical picking, dialog boxes, ...)
For developing, running and debugging script programs, FEMtools includes an integrated script editor with color coding.
Availability
FEMtools Script is available on all platforms on which FEMtools is supported (64-bit Windows and Linux OS). Applications written in FEMtools Script are platform-independent and require a FEMtools 2.0 (or later) license to run the scripts.
Applications
Although the possibilities are endless, some typical applications of FEMtools Script are in development of:
- Analysis plug-ins
- Analysis customization and extensions
- Pre- and postprocessing (FE and test data)
- Data and analysis flow control (e.g. using external solvers)
- Wizards
- Data filters (e.g. test data)
- Data interfaces
- User interface and command language customization
Some Examples of Script-Based Applications
Examples of current FEMtools tools that were developed using FEMtools Script are:
- Drivers for Nastran, ANSYS and I-DEAS Master Series
- Pre- and postprocessor for SOL 200 analysis in Nastran
- Interface with the FEMAP Neutral Format
- Structural Dynamics Modification
- A test data postprocessing program that imports data coming from a laser scanning device
- Eigenvector orthogonality (FEA-FEA, FEA-Test and Test-Test) using reduced system matrices
- MAC contribution analysis
- Sensitivity matrix condition analysis
- Material identification of composite plates using vibration analysis
- Pretest analysis tools
- A test data filter and averaging algorithm used to process noisy data