Community Knowledge > Automation & Scripting
Automating Amesim with the Python/MATLAB/VBA Simulation Scripting API
Beyond the GUI, Amesim exposes a scripting layer intended for automating repetitive modeling and simulation tasks. This is documented officially but the practical "how do I actually use this" framing is better covered by community/partner content and forum Q&A.
Two distinct APIs
- Simulation Scripting API: focused on automating Parameter mode and Simulation mode tasks — setting/retrieving parameter values, running temporal simulations or linear analyses, running batch simulations across multiple cases, and post-processing results (2D/3D plots, animations, signal analysis).
- Circuit API (sometimes called the "API" more generally): superset of the above plus the ability to programmatically place components, connect them, and build model topology — i.e., constructing a model from scratch via script, not just driving an existing one.
Both are usable from Python, MATLAB, and VBA — so teams can pick whichever host language fits their existing tooling rather than being locked into one.
Batch simulation via the scripting commands
The batch-run workflow scripts what you'd otherwise do manually in Study Manager, using three key commands:
ame put batch— takes a Python dictionary describing a parameter/value combination that forms a new "set" (i.e., one case) in the Study Manager.ame run batch— executes the configured batch.ame get batch run status— polls/retrieves the run status.
This is the practical building block for scripted parameter sweeps, Monte Carlo studies, and sensitivity analyses that go beyond what the Study Manager GUI conveniently supports.
What people actually build with it
Community discussion (Siemens forums, community Q&A) confirms the API is used to build:
- Automated pre-processing pipelines.
- Parameter studies: simple sweeps, Monte Carlo analysis, sensitivity analysis.
- Automated post-processing: 2D/3D plotting, animation generation, signal analysis — chained together into a repeatable pipeline rather than manual, one-off GUI work.
- Automated modeling of repetitive systems — Siemens publishes an example KB article ("Example of a Python API Macro to automate modeling of repetitive systems in Simcenter Amesim") specifically for using the Circuit API to programmatically replicate similar subsystems (e.g., N identical battery cells, N identical actuator channels) rather than hand-building them in the GUI.
Multiprocessing caveat
A Siemens community thread specifically titled "Using Multiprocessing modules in LMS Amesim API in Python" indicates this is a real point of friction — running Amesim API calls under Python's multiprocessing (to parallelize batch runs across cores) is a nontrivial-enough topic that it needed its own community thread, suggesting it isn't a drop-in, works-by-default scenario. Anyone planning to parallelize Amesim batch runs via Python multiprocessing should search that thread directly and test carefully rather than assuming naive multiprocessing wrapping will work.
Getting started with the API from the command line
Siemens publishes a specific KB article, "How to launch Python AMESim API using command prompt," indicating this initial setup step (getting the Python environment correctly wired to Amesim's API rather than just launching Amesim's GUI Python console) is itself a common early stumbling block worth checking before assuming your script's logic is at fault when nothing runs.
Sources: Simcenter Amesim – Simulation Scripting and API – Part 1 (Volupe), Simcenter Amesim – Simulation Scripting and API – Part II (Volupe), Example of a Python API Macro to automate modeling of repetitive systems in Simcenter Amesim (Siemens KB)
Source: https://volupe.com/simcenter-amesim/simcenter-amesim-simulation-scripting-and-api-part-1/ · retrieved 2026-07-08