Hello everyone,
I am a complete beginner with Python as well as the Python scripting for Plaxis use.
I have searched through the web and the Bentley Communities and I couldn't find any topic related to basic scripting such as drawing simple geometries and a simple use of Python in general.
Therefore my discussion topic for beginners.
My first question is (very basic... I know, but I have no clue how to deal with it...)
Why does my script doesn't work (Plaxis 2D) ?
from plxscripting.easy import *s_i, g_i = new_server('localhost', 10000, password='>$viK!uhVhx9PB8Ss')
g_i.gotostructures()
x_min = -10x_max = 10y_min = -10y_max = 10
boundaries =[]boundaries.append([x_min,y_min])boundaries.append([x_max,y_min])boundaries.append([x_max,y_max])boundaries.append([x_min,y_max])
g_i.polygon(*boundaries)
The error is the following (line 17 is g.i.polygon(*boundaries))
File "testpython1.py", line 17, in <module> g.i.polygon(*boundaries)NameError: name 'g' is not defined
Thanks for any tips,
EDIT : I found the error. Syntax error.