Get the ID rather than the phase number when scripting

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

Parents

  • Thank you very much for the prompt response, some of these articles I had already reviewed, what I could not find was the explanation you gave me about the load when you use an asterisk.

    thank you




    De: Stefanos Papavasileiou [bounce-cdbba617-aa83-4c94-b37e-bf6969746ae6@communities.bentley.com]
    Enviado: viernes, 12 de febrero de 2021 05:15 a.m.
    Para: PLAXISSOILVISION@communities.bentley.com
    Asunto: RE: [PLAXIS | SOILVISION Forum] Get the ID rather than the phase number when scripting

    Update from Bentley Communities
    Stefanos Papavasileiou

    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 -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)

    In Staged construction you can activate and change the value like this:

    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

Reply

  • Thank you very much for the prompt response, some of these articles I had already reviewed, what I could not find was the explanation you gave me about the load when you use an asterisk.

    thank you




    De: Stefanos Papavasileiou [bounce-cdbba617-aa83-4c94-b37e-bf6969746ae6@communities.bentley.com]
    Enviado: viernes, 12 de febrero de 2021 05:15 a.m.
    Para: PLAXISSOILVISION@communities.bentley.com
    Asunto: RE: [PLAXIS | SOILVISION Forum] Get the ID rather than the phase number when scripting

    Update from Bentley Communities
    Stefanos Papavasileiou

    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 -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)

    In Staged construction you can activate and change the value like this:

    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

Children
No Data