AmesimKnowledge

The Simcenter Amesim Export module in detail > Direct interfaces

Simcenter Amesim and the Visual Basic applications interface

This section is only intended for Windows® users who know how to include some subroutines in Visual Basic code, and having some skills in Visual Basic for Applications coding.

The Visual Basic for Applications (VBA) is a macro language that can be used to customize and extend MS Office applications. The Simcenter Amesim/VBA interface is a set of VBA subroutines gathered in a VBA module. This module can be included in any application that can deal with VBA. Then you can use this set of subroutines to pilot Simcenter Amesim simulations from such an application.

The name of this module is AMEVbaInterface.bas. It is stored in the %AME%\scripting\VBA directory where %AME% is the Simcenter Amesim installation directory.

Warning

This module is deprecated. Consider using the Simulation Scripting API instead. This API can be found here: %AME%\scripting\VBA\amesim.xlt.

The principle is fairly simple, the AMEVbaInterface.bas module includes several VBA subroutines that can be used to:

  • Get parameters from an Simcenter Amesim systems (AMEVbaGetPar subroutine)

  • Modify parameters (AMEVbaPutPar subroutine)

  • Run a simulation within a VB application (AMEVbaRun subroutine)

  • Get final results after the simulation (AMEVbaGetFinalRes subroutine)

  • Get simulation results (AMEVbaGetRes subroutine)

A typical application is to use these subroutines from some Excel code in order to display parameters and results in an Excel worksheet and also to use the data for any post-treatment.

Source: https://docs.sw.siemens.com/en-US/doc/254352342/PL20250521841123434.amesim_collection.Export/AMESim_and_the_Visual_Basic_applications_interface · retrieved 2026-07-17