What is the PLAXIS API?

The PLAXIS API (Remote Scripting) allows you to drive PLAXIS 2D/3D using Python instead of only using the graphical interface. You send commands from a script, PLAXIS builds the model, runs the calculation and returns the results.

In practice, PLAXIS acts as a calculation engine and your Python script becomes the "controller" that defines geometry, soil materials, structural elements, phases and output.

Fundamental Principle of Using the PLAXIS API

When you use the API, you are not changing the constitutive models or the solver. You are simply replacing mouse clicks with Python commands. The main ideas are:

Core Objects

Object Role Typical Use
s_i Server input session Connection to PLAXIS Input (model building)
g_i Global Input object Set project data, geometry, soil/structural materials, loads, phases, mesh
s_o Server output session Connection to PLAXIS Output (post-processing)
g_o Global Output object Access stresses, strains, displacements, curves and cross-sections

Typical API Workflow

  1. Start PLAXIS Input/Output and enable the Remote Scripting Server.
  2. Connect from Python using new_server("localhost", port, password).
  3. Create or modify the model using g_i (soil contour, boreholes, materials, structures, phases).
  4. Generate the mesh and run calculations from the script.
  5. Use g_o to read results and export tables or plots.

Benefits of Using the PLAXIS API

Using the PLAXIS API is especially helpful when you need to repeat similar analyses, explore many design options or link PLAXIS to other tools (spreadsheets, web apps, optimisation or AI workflows).

Why Use the API?

Aspect Only GUI With API (Python)
Repeatability Manual steps, easy to miss a setting. Same script, same model every time; fully documented.
Parametric studies Change parameters by hand case by case. Loop over many values automatically and collect results.
Speed Time-consuming for similar projects. One command can build, run and export multiple cases.
Integration PLAXIS used in isolation. PLAXIS can be coupled with spreadsheets, web forms, optimisation or ML models.
Quality & audit Harder to reconstruct exactly what was done. The script is a complete, version-controlled record of all inputs, phases and changes.

Example Use Cases

What Knowledge Do You Need?

You do not need to be a software engineer to use the PLAXIS API effectively. The key ingredients are:

The tutorials in the navigation bar build on this overview and demonstrate concrete examples: creating models, assigning materials, applying loads and extracting results using the PLAXIS API.