Hello,
In my python script I would like to locally refine the mesh for some lines.
I had a look in the Plaxis command index via the Scripting reference and from what I understand there is only a python command for global refinement.
So is there any existing command line?
I was trying the following commands:
for line in g_i.lines:
mesh = 0.5
g_i.set(line.coarsenessfactor,(mesh))
But it says that requested attribute coarsenessfactor is not present…
Any idea,
Thank you,
Pascal
Thanks a lot Stefanos that is definitely working. Next time I will strongly think about this case sensitivity... Thanks again!
Dear Pascal,
I would write it as follows:
for line in g_i.Lines: factor = 0.5 line.CoarsenessFactor = factor
If you want to use the set command with Python, then you would say: g_i.set(line.CoarsenessFactor, factor)
Note that Python is case sensitive and very strict with it. The property in PLAXIS is .CoarsenessFactor and you need to be exact when addressing objects (g_i.Lines) and parameter names.