×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

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!
  • Students Click Here

*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 - EXCEL API

ETABS - EXCEL API

ETABS - EXCEL API

(OP)
Hi All,

I am starting using ETABS 2016 API in Excel.

One of my problem is setting the current unit of ETABS 2016 unit to my desire unit which is kN.mm.C.

I had tried the following codes, but none of them change the ETABS unit:

ret = mySapModel.SetPresentUnits_2(ETABS2016.eForce_kN, ETABS2016.eLength_mm, ETABS2016.eTemperature_C)
ret = mySapModel.SetPresentUnits(kN_mm_C)
ret = mySapModel.SetPresentUnits(eUnits_kN_mm_C)
ret = mySapModel.SetPresentUnits(ETABS2016.eUnits_kN_mm_C)

I hope someone can help me.

RE: ETABS - EXCEL API

Good to see you are using the etabs api. I spent about a year using it with VBA before converting over to Python.

Try using the interger value given in the eUnits Enumeration:

ret=mySapModel.SetPresentUnits(5)

RE: ETABS - EXCEL API

(OP)
Dear rscassar,

I checked it, but it didn't work.

RE: ETABS - EXCEL API

Try using the GetPresentUnits() method and see what data type is returned

RE: ETABS - EXCEL API

I looked over some of my old VBA scripts, have a look at this one here

RE: ETABS - EXCEL API

(OP)
Dear rscassar,

I check it, the return values are OK, and it seems that the function work, but the displayed unit in ETABS do not changes and when I apply some editing, it is done based on ETABS unit and not the set unit.

RE: ETABS - EXCEL API

When exporting from ETABS to excel what is exported is the Database units, not the present units. If you use the GetDatabaseUnits function you will see they are different than the present units.
I believe there is a SetDatabaseUnits which you can use in lieu of your SetPresentUnits function.
If there is no GetDatabaseUnits function, you’ll have to set up functions that scale the result to the desired units based on what GetPresentUnits outputs.

RE: ETABS - EXCEL API

(OP)
Hi,

Thanks a lot. yes, the displayed unit is not used for database.

I have another question:

Is there any command that we can define a time history function automatically in ETABS?

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


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