×
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

Jobs

ETABS VBA Programming (Help with SetLoads Function)

ETABS VBA Programming (Help with SetLoads Function)

ETABS VBA Programming (Help with SetLoads Function)

(OP)
I'm trying to create a series of linear modal time history load cases in ETABS using VBA and the ETABS OAPI. However, when I try to set the "Applied Loads", it doesn't seem to be changing anything when I go to check the load case after the code has run. Here's the applicable portion of my code:

CODE -->

Dim LoadType(0) As String
Dim LoadName(0) As String     'Load pattern name
Dim Func(0) As String    'Forcing function
Dim sf(0) As Double    'Scale factor
Dim TF(0) As Double    'Time factor
Dim at(0) As Double    'Arrival time
Dim CSys(0) As String     'Coordinate system
Dim Ang(0) As Double    'Angle
        
LoadType(0) = "Load Pattern"
LoadName(0) = "Step1"
Func(0) = "Func1"
sf(0) = 1
TF(0) = 1
at(0) = 0
CSys(0) = "Global"
Ang(0) = 0
    
ret = SapModel.LoadCases.ModHistLinear.SetLoads("StepCase1", 1, LoadType(), LoadName(), Func(), sf(), TF(), at(), CSys(), Ang()) 

The other annoying thing is if I use the .GetLoads method, it doesn't return anything either. Can anyone point out what I'm doing wrong?

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!


Resources