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

Post Reply
Przemek
Posts: 2
Joined: Tue Jul 04, 2023 2:51 pm

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

Post by Przemek » Tue Jul 04, 2023 3:17 pm

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
Attachments
Example.zip
(171.48 KiB) Downloaded 106 times

STKO Team
Posts: 3066
Joined: Tue Oct 29, 2019 8:45 am

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

Post by STKO Team » Fri Jul 07, 2023 9:34 am

If you want to parametrize the geometry, you need to build the geometric model from a Python script.

Przemek
Posts: 2
Joined: Tue Jul 04, 2023 2:51 pm

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

Post by Przemek » Mon Jul 10, 2023 12:38 pm

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.

STKO Team
Posts: 3066
Joined: Tue Oct 29, 2019 8:45 am

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

Post by STKO Team » Tue Jul 11, 2023 9:00 am

You're welcome

Post Reply