API / Python scripting - PLAXIS


This section contains examples and background information on the use of the PLAXIS Remote Scripting server API and the use of the Python wrapper.

Using PLAXIS Remote scripting with the Python wrapper
Access to Staged Construction settings using Python
The staged construction settings and values for any Intrinsic properties of all UserFeatures can be retrieved and set using these Python scripts.
Adding functionality to PLAXIS Calculation Manager: pre- and post-processing
When using the Calculation manager tool, it is possible to include one pre-processing and/or one post-processing Python script.
Automatic line cross-section chart generation using Python
Having trouble making cross sections for PLAXIS results using the Python wrapper? Find a working solution with an example in this article!
Automatically generated cross-sections of embankments
A Python script was developed to create multiple cross-sections of an embankment at different locations making the design process more effective.
Changing the material colour using Python scripting
In this example, we will show how to change a soil material colour in PLAXIS 2D and PLAXIS 3D using a working Python script example.
Combined plate results in one chart using Python
We defined a Python script combining forces and displacements for a single wall into one plot and table for easy extraction of combined results. The page includes a fully working Python script for PLAXIS 2D 2017 you can run directly from the program without installing or programming!
Command line reference
Create custom connection with selection API
Damage assessment of adjacent buildings caused by excavations using the Burland's chart
In this article, you can read how to do damage assessment of a building using Burland's chart or a user-defined chart in PLAXIS using a Python script.
Author: Hung Ho Manh - Technical Support Group
Export and format plots from PLAXIS Output using Python
PLAXIS Output offers the possibility of using Python scripting to configure the plot settings in order to export a plot to a file for post-processing.
How to create a tunnel using Python
In this article, it is explained how to use the Remote scripting feature (Python commands) to create a tunnel using the PLAXIS tunnel designer.
How to get a load - displacement curve using Scripting interface
How to identify the material name of an object in Output using Python scripting
With Python scripting you can easily identify the material name of any object in PLAXIS Output. Check this article for an example.
How to install additional Python modules in PLAXIS
The article explains the available options on how to install and use any Python modules with the PLAXIS scripting environment.
How to open and close a PLAXIS project with Python
The following article explains how to open and close any PLAXIS project using Python when using the PLAXIS scripting environment.
How to retrieve results from PLAXIS Output by the node number
A simple Python example on how to retrieve results from the PLAXIS 2D Output program by providing the node number.
Identify Python commands from PLAXIS command line
Since PLAXIS CONNECT Edition V20, extensive documentation is available regarding the Remote Scripting functionality. This can be found under Help > Scripting reference menu. The first step to identify the command syntax when using the Python scripting functionality is to understand the Plaxis native command.
Material Property changes for Python scripting
The Material object data structure has been updated to be more flexible for future developments. This page list the changes between PLAXIS V21 and V22
Material lists in PLAXIS - Python
To get a list of just soil or plate material using Python, we can use a simple line to retrieve these. Here we show you how to easily do this.
Optimize excavation calculation time for wall horizontal displacement criteria
A Python script is provided to stop the calculation at an intermediate phase if the horizontal displacement is larger than a limitation in excavations
Output scripting example: create curve data
Output scripting example: get anchor force
Output scripting example: get heave of excavation bottom
Output scripting example: get maximum bending moment
PLAXIS Soil model numbers in command line
For PLAXIS 2D or 3D you can define a soil/rock material with a specific soil model directly via the command line or via remote scripting.
Polycurves to Polygons in PLAXIS 2D using Python
Sometimes you import a geometry into PLAXIS 2D via e.g. a DXF file, but the import does not generate soil polygons, but polycurves (just the outlines). This Python script fixes it.
Python and lambda property of Modified Cam-Clay model
This article offers a way to define the Modified Cam-Clay model's lambda parameter via Python since it is a Python reserved keyword.
Receive instant notifications for finished calculations on your phone
Remove invalid custom connections for PLAXIS 3D
With the PLAXIS Remote scripting API, it is possible to automate the process of handling any invalid custom connections present in a project.
Retrieve coordinates of a Polygon in PLAXIS 2D using Python
In PLAXIS 2D, you may want to know all the coordinates of a polygon in order to use it in your Python/scripting environment. This page shows a Python snippet to quickly retrieve this info.
Retrieving soil layer info from boreholes using Python
In each borehole, soil layer information is stored: top, bottom and thickness. The attached Python script reads this data and returns it to be used in your script!
Scripting reference and how to use it
Since PLAXIS CONNECT Edition V20, extensive documentation is available regarding the Remote Scripting functionality. This can be found under Help > Scripting reference menu. The documentation is based on�Jupyter�notebooks and requires the activation of the Remote scripting server.
Selection API for PLAXIS Input
With Python scripting, it is now possible to take advantage of the interactive selection of objects and pass them to the scripting layer for further usage. This can be achieved using the selection API.
Soil layer material assignment using Python
This Python scripting example will teach you how to automatically assign soil materials to the borehole soil layers in your PLAXIS model.
Support capacity evaluation of a tunnel lining in PLAXIS 2D
An example is provided for the Python automation of defining composite section plate properties and evaluating tunnel liner capacity with PLAXIS 2D.
Author: Richard Witasse - Application Engineer
Tunnel advancement script for PLAXIS 3D
Advancing tunnels in PLAXIS 3D may need many calculation phases to model the full sequence and can be tedious to do. Using automation (and Python) this can all be done with a single action.
User defined Python script (3D): Extract displacements by coordinates