Properties visualization

Post Reply
Pietro
Posts: 2
Joined: Fri Nov 14, 2025 2:05 pm

Properties visualization

Post by Pietro » Fri Nov 14, 2025 5:07 pm

Hello,
I'm trying to create a structural model using the Python API.
I followed some examples I found in this forum to create geometries, physical properties, element properties, etc.
I am having an issue after assigning properties: the parameters are correct, but in the STKO view, I cannot see the column extrusion until I manually click on the newly generated properties in the work tree.

Another question,
is there a way to assign random color in Shader, so that when i check my fiber section, i can view rebars, confined and unconfined concrete?

Attached is my script that creates the physical properties.
Thank you for your help!
Attachments
create physical properties.zip
(1.53 KiB) Downloaded 12 times

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

Re: Properties visualization

Post by STKO Team » Wed Nov 26, 2025 11:38 am

For some reason (we still have to investigate), you have to call BSP.commitXObjectChanges() twice. If you do so it will work

Pietro
Posts: 2
Joined: Fri Nov 14, 2025 2:05 pm

Re: Properties visualization

Post by Pietro » Wed Nov 26, 2025 2:35 pm

Thank you very much for your answer.

Using this approach, if I assign my BWH to the edge, I can see the elastic part of the column, but the fiber sections at the I and J nodes do not appear in the STKO view. I believe the issue is in my script for importing and creating the fiber sections. In fact, when I check the RectangularFiberSection properties, the fiber mesh is missing. In the attached script, I was not able to correctly create the MpcBeamFiberSection starting from the defined parameters (width, number of rebars, mesh size, etc.), I entered the attempts as comments.

As a confirmation, when I run “Write Input File”, the sections.tcl file contains only the torsion property (GJ). In attachment, I have also included the sections.tcl file, which shows only one correct fiber section; the one I manually click edit physical property in the work tree.

I apologize for the question about the colors of the materials. It was enough to use doc.randomizeMaterialColors()

Thank you again for your help.
Attachments
files.zip
(3.98 KiB) Downloaded 3 times

Post Reply