API Scenario Guide

The APIs drive SimWorks from Python or MATLAB: build models, change parameters, run simulations, fetch results, and plug into external libraries, schedulers, or your own pipelines. All seven solvers can be part of an automation flow (see the corresponding API and solver docs for details).

When to Use the API

Typical cases:

  • Batch and pipelines: sweep many geometry or material combinations and write results to your own folders or databases;
  • Scientific computing stacks: post-process, fit, or optimize with NumPy / SciPy / MATLAB toolboxes;
  • Cross-tool workflows: exchange data with process, layout, or other software via scripts;
  • Unattended runs: queue repeated jobs on a local machine, cloud, or cluster.

For quick multi-run parameter studies inside the product UI, prefer Optimization and Sweep. To control projects mainly from the built-in script editor, start with Script Commands.

Typical Scenarios

  1. Parameterized device batches
    Loop over structure sizes or materials via the API, run FDTD / FDE / EME (and others), and collect loss, effective index, or S-parameters.

  2. Export and secondary analysis
    After a run, pull monitor or solver data through the API and plot, filter, or compare with measurements in Python / MATLAB.

  3. Custom optimization loops
    An external optimizer updates design variables, writes them back through the API, launches the solver, and reads the objective—useful when GUI sweep or inverse design does not cover your flow.

Setup Entries

For the platform workflow and scripting overview, see the Preface.