cCaseStaticLinearSetLoads Method |
Namespace: ETABS2016
int SetLoads( string Name, int NumberLoads, ref string[] LoadType, ref string[] LoadName, ref double[] SF )
If the LoadType item is Load, this item is the name of a defined load pattern.
If the LoadType item is Accel, this item is UX, UY, UZ, RX, RY or RZ, indicating the direction of the load.
Public Sub Example() Dim SapModel As cSapModel Dim EtabsObject As cOAPI Dim ret As Integer = -1 Dim MyLoadType() As String Dim MyLoadName() As String Dim MySF() As Double 'create ETABS object EtabsObject = CreateObject("CSI.ETABS.API.ETABSObject") 'start ETABS application ret = EtabsObject.ApplicationStart() 'create SapModel object SapModel = EtabsObject.SapModel 'initialize model ret = SapModel.InitializeNewModel() 'create steel deck template model ret = SapModel.File.NewSteelDeck(4, 12, 12, 4, 4, 24, 24) 'add static linear load case ret = SapModel.LoadCases.StaticLinear.SetCase("LCASE1") 'set load data ReDim MyLoadType(1) ReDim MyLoadName(1) ReDim MySF(1) MyLoadType(0) = "Load" MyLoadName(0) = "DEAD" MySF(0) = 0.7 MyLoadType(1) = "Accel" MyLoadName(1) = "UZ" MySF(1) = 1.2 ret = SapModel.LoadCases.StaticLinear.SetLoads("LCASE1", 2, MyLoadType, MyLoadName, MySF) 'refresh view ret = SapModel.View.RefreshView(0, False) 'close ETABS EtabsObject.ApplicationExit(False) 'clean up variables SapModel = Nothing EtabsObject = Nothing End Sub