Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

ETABS API Getting Frame Forces

yardogan

Civil/Environmental
Joined
Mar 19, 2003
Messages
3
Location
TR
Hi guys ,
I have a problem getting frame forces from ETABS using API.
I did all, but ı couldn't get frame forces.
Below code line, VBA doesnt get number results (station number on frame) Therefore ,P( ) array has no element.
ret = mySapModel.Results.FrameForce(MyName(i), ETABSv1.eItemTypeElm_Element, NumberResults, Obj, ObjSta, Elm, ElmSta, LoadCase, StepType, StepNum, P, V2, V3, T, M2, M3)
The code works on some ETABS model, and others it does not.
I could not any way to solve the problem. Maybe there is anyone who is good at API.

Thanks for advance
 

Attachments

  • Ekran görüntüsü 2025-05-21 161427.jpg
    Ekran görüntüsü 2025-05-21 161427.jpg
    83.8 KB · Views: 8
  • Ekran görüntüsü 2025-05-21 161516.jpg
    Ekran görüntüsü 2025-05-21 161516.jpg
    10.4 KB · Views: 8
If you have one model where it works and one where it doesn't you should be able to do a bit of trouble shooting. What's the difference between the two models? Do both models run to completion with full results available or does one fail and become unstable.

Usually you can pinpoint some of the trouble just with the regular UI and then figure out how to handle the errors on the coding side afterwards.
 
Yes. Two model run to completion. There is no problem.
As ı can see that two models are different. One model is linear analysis model, another one is non linear model where plastic hinges are defined on frame object.
maybe there is another way to get frame results and hinge status using ETABS API. I dont know .
There is no record about hinge forces on .chm help file related ETABS API. ı could not find any soluiton to get frame hinge status data from ETABS using VBA API code or something.
 
Have you tried accessing the data through the database tables?

Anything that is available to you through the database tables is available to you through the API. Seems like this is the new way CSI is pushing their API and exposing new functions.

Below is an example of output from a non-linear load case, you can see the plastic hinge develop around step 9.

Screenshot 2025-05-23 180853.png

I have a few examples of database tables and example code on github.



Python:
TableKey = 'Joint Displacements'
FieldKeyList = []
# set the group you want the results for, you can pick either 'All', 'Left Nodes', 'Right Nodes'
GroupName = 'Top Node'

TableVersion = 1
FieldsKeysIncluded = []
NumberRecords = 1
TableData = []

JointDisplacement = SapModel.DatabaseTables.GetTableforDisplayArray(TableKey, FieldKeyList, GroupName, TableVersion, FieldsKeysIncluded, NumberRecords, TableData)

JointXDiplacement = []

#pulls the correct value out for joint dipslacement.
for i, xdisp in enumerate(JointDisplacement[4]):
    if ((i-8)%14) == 0:
        JointXDiplacement.append(xdisp)
Time = []      

for i, xdisp in enumerate(JointDisplacement[4]):
    if ((i-6)%14) == 0:
        Time.append(xdisp)
 
Thank you very much indeed. I am gonna try this method.
Also ı had problem getting hinge status using ( I have found that VBA API is not capable doing this)
Maybe this method help me .
My goal is to get hinge status and rotation and then compare them automatically with plastic hinge limit rotation.
I appreciate your help
:)
 

Part and Inventory Search

Sponsor

Back
Top