I have a PLaxis2D model which i open using python and want to extract all the information.
I am currently struggling to extract the SoilContour/Canvas information.
In the GUI you can see this in FIle/Project properties/Model/COntour, but i cannot find what the equivalent python command is.
g_i.Project gives the rest of the information i.e. Type and Units but not the Contour information
Dear Natalie,
This belongs to the SoilContour object. You can "guess" that by running the program manually and seeing the generated command.
Now to extract the data, there is indeed some side information to consider.
When you add the numbers, in the back end we define a rectangle which is the SoilContour. As with any rectangle, it has lines to define it. You can identify this by using the command: info SoilContour
Therefore, now we have established that the four numbers you provide in the Project properties help define four lines for the SoilContour object.
So, what you can do is loop over the lines of the SoilContour object and find the coordinates of the points of each line. For example:
for line in g_i.SoilContour.Lines: print(line.First.x, line.First.y, line.Second.x, line.Second.y)
Since I do not really know what you want to do with these, I cannot really recommend how to process them, but you could use a list or even a set in Python.
I hope that this helps in understanding and as a solution.