This tutorial shows how to control PLAXIS 2D using Python via the Remote Scripting API, inside a Jupyter Notebook.
When you create a notebook from PLAXIS Input, two key objects are available:
s_i– the Input server object (sends commands to PLAXIS Input).g_i– the global Input object (access to project data: geometry, materials, etc.).
Similarly, for PLAXIS Output you have s_o and g_o.
from plxscripting.easy import *
user_password = "input your own password"
# Connect to PLAXIS Input (port 10000) and Output (port 10001)
s_i, g_i = new_server('localhost', 10000, password=user_password)
s_o, g_o = new_server('localhost', 10001, password=user_password)
Make sure PLAXIS Input and Output are running with Remote Scripting enabled on ports
10000 and 10001 before running this cell.