Hello!
This might be a real simple question but I cannot seem to find any solution online
When writing scripts and per the examples available on the website - the results often are presented as for example : Phase 3, max moment 45 knm/m. As the phases often tend to get non-consecutive numbering it's hard to keep track when having a lot of phases in the calculation. Is there a way to have the results from the script print the ID of the phase (i.e. the name that I have given the phase) instead of the phase number?
Grateful for any assistance
Dear Robin Rohwer Bokvist,
You can try to use:
g.Phases[1].Identification.value
More information you can find in the Command reference and in Scripting reference:
For example (Command reference → Input → Input objects reference → Phase):
In command line we can use:
_set Phase_1.Identification "Some phase title"
excuse some example where a load is applied is that when I run my script it marks an error in the module and I don't know why it should be
Dear Grissel,
Following my answer to the service request earlier this week I include my response here for the Forum.
Unfortunately, we do not have such a specific Python script, however, I believe that with the information below you can succeed.
First of all, please check the Wiki article about the Python scripting in understanding how to work with our boilerplate: communities.bentley.com/.../using-plaxis-remote-scripting-with-the-python-wrapper
I would also strongly advise you to check our Scripting reference as we give examples for every command used in PLAXIS: communities.bentley.com/.../scripting-reference-and-how-to-use-it
The following article is very useful in understanding the command syntax in PLAXIS and what is needed by Python:communities.bentley.com/.../identify-python-commands-from-plaxis-command-line
Then, we have quite a few examples on our Wiki pages of various cases that you can use: communities.bentley.com/.../api-python-scripting---plaxis
To give you a quick answer, adding a load in Structure mode can be done with the following command:
PLAXIS: lineload (0 0) (2 0)Python: g_i.lineload(0, 0, 2, 0)
PLAXIS: set Line_1.LineLoad.qy_start -100Python: g_i.Line_1.LineLoad.qy_start = -100 or g_i.LineLoad_1.qy_start = -100 or g_i.LineLoad_1.qy_start.set(-100)
In Staged construction you can activate and change the value like this:
PLAXIS: activate (LineLoad_1_1) Phase_1Python: g_i.activate(g_i.LineLoad_1_1, g_i.Phase_1)
PLAXIS: set LineLoad_1_1.qy_start Phase_1 -150Python: g_i.LineLoad_1_1.qy_start[g_i.Phase_1] = -150or g_i.LineLoad_1_1.qy_start.set(g_i.Phase_1, -150)
The following article is very useful in understanding the command syntax in PLAXIS and what is needed by Python: communities.bentley.com/.../identify-python-commands-from-plaxis-command-line
PLAXIS: lineload (0 0) (2 0) Python: g_i.lineload(0, 0, 2, 0)
PLAXIS: set Line_1.LineLoad.qy_start -100 Python: g_i.Line_1.LineLoad.qy_start = -100 or g_i.LineLoad_1.qy_start = -100 or g_i.LineLoad_1.qy_start.set(-100)
PLAXIS: activate (LineLoad_1_1) Phase_1 Python: g_i.activate(g_i.LineLoad_1_1, g_i.Phase_1)
PLAXIS: set LineLoad_1_1.qy_start Phase_1 -150 Python: g_i.LineLoad_1_1.qy_start[g_i.Phase_1] = -150 or g_i.LineLoad_1_1.qy_start.set(g_i.Phase_1, -150)
View online
You received this notification because you subscribed to the forum. To unsubscribe from only this thread, go here.
Flag this post as spam/abuse.
Puede consultar el Aviso de Privacidad del Instituto de Ingeniería UNAM en: http://www.iingen.unam.mx