Page 1 of 1

Need Help with STKO Python API Scripting (Change geometric dimensions)

Posted: Tue Jul 04, 2023 3:17 pm
by Przemek
Hello everyone, and greetings to the STKO team,

I have a relatively straightforward question that has been bothering me for days. I am currently working with a simple pushover model and trying to familiarize myself with the Python API scripting.

The first script, which allows me to increase the applied load and obtain multiple results, works perfectly. However, I am encountering a problem with what I want to do next.

I have a single beam subjected to an axial force, followed by a corresponding displacement in the next step. The beam has a length of, for example, 2000mm. What I would like to do is incrementally increase the length of the beam(2000, 4000, 6000, 8000mm, etc.) in parallel and display the load-deformation curves in the monitor.

Image

Unfortunately, I am currently unable to do this because I cannot find the appropriate command to change the geometric properties. Please see the attached script for increasing the axial load from your workshop/tutorial.

In principle, for this existing model, I would like to increase or vary the length of the beam instead of the axial force.
I am trying to find a command similar to "cond = doc.getCondition(3)" so that I can move the upper node only. I also tried "scale" but failed. Unfortunately, there also seems to be no command like "getNode()" or "getGeometries()". This is where I have been failing for days and cannot make any progress. :?

Could you assist me with this? :)

Best regards,
Przemek

Re: Need Help with STKO Python API Scripting (Change geometric dimensions)

Posted: Fri Jul 07, 2023 9:34 am
by STKO Team
If you want to parametrize the geometry, you need to build the geometric model from a Python script.

Re: Need Help with STKO Python API Scripting (Change geometric dimensions)

Posted: Mon Jul 10, 2023 12:38 pm
by Przemek
Oh, that's unfortunate. I already suspected that it might be more complex. I just wasn't sure. I'll try it that way then.

Thank you very much for your feedback.

Re: Need Help with STKO Python API Scripting (Change geometric dimensions)

Posted: Tue Jul 11, 2023 9:00 am
by STKO Team
You're welcome