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!
Properties visualization
Properties visualization
- Attachments
-
- create physical properties.zip
- (1.53 KiB) Downloaded 12 times
Re: Properties visualization
For some reason (we still have to investigate), you have to call BSP.commitXObjectChanges() twice. If you do so it will work
Re: Properties visualization
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.
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