×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

ETABS API (python)-Assigning Frame Problem

ETABS API (python)-Assigning Frame Problem

ETABS API (python)-Assigning Frame Problem

(OP)
Hi, I have been experimenting with optimizing truss using metaheuristic algorithm using python.
I have been able to open ETABS, assign all frame member with the available option using and index, running the model, and extracting the result.
However, I encountered some unintended result. When I tried to assign for example:

CODE --> python

# the combination of frame that will be assign to each member (0-15)
x=np.array([3, 2, 3, 2, 1, 6, 2, 1, 2, 6, 1, 3, 2, 1, 5, 6, 1, 3, 1, 5, 1, 15]) 
The ETABS will result in all member using the option index 15 (the last one).


I suspect, it might be because I use:

CODE --> python

sapModel.DesignSteel.SetDesignSection(framename,section_type,False,0) 

it assign all member instead of targeted member, the function syntax is shown here:

I'm not sure about the last input to the function, since the CSI API does not provide python example.

I attached my model with a simple python code to show my problem. I would be very grateful if somebody could help me fix this problem
Thank you.

RE: ETABS API (python)-Assigning Frame Problem

The last option is optional if you check the VB syntax. Generally I apply only to the object, this would be the frame name.

CODE --> python

SapModel.DesignSteel.SetDesignSection(framename,section_type,False,0); #for object or
SapModel.DesignSteel.SetDesignSection(framename,section_type,False); #for object
SapModel.DesignSteel.SetDesignSection(groupname,section_type,False,1); #for group
SapModel.DesignSteel.SetDesignSection(anyname,section_type,False,2); #for selected objects 

RE: ETABS API (python)-Assigning Frame Problem

(OP)
I have used 0 and every beam still changes as seen from my code.
Maybe I'm supposed to use enumeration of somekind (?)
Anyway it does not change the outcome using int (0,1,2).

RE: ETABS API (python)-Assigning Frame Problem

(OP)
I have made some new observation.
If I used SetDesignSection(framename,section_type,False,0) in succession (e.g. in a loop)
it always changed all the framename that have been changed before.
so if I change beam 82,83,84. This three beam will follow the frame that 84 used.
I don't know why does this happen.
If I run the model in between the SetDesignSection, it does not happen.

I would be grateful if there is another way to circumvent this problem.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Resources

Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close