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 TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

ETABS VBA Programming (Help with SetLoads Function)

Status
Not open for further replies.

djsereno

Structural
Joined
Jan 9, 2015
Messages
1
Location
US
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?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top