SapObject.SapModel.RespCombo.GetCaseList
Function GetCaseList(ByVal Name As String, ByRef NumberItems As Long, ByRef CType() As eCType, ByRef CName() As String, ByRef SF() As Double) As Long
Name
The name of an existing response combination.
NumberItems
The total number of analysis cases and response combinations included in the response combination specified by the Name item.
CType
This is an array of one of the following items in the eCType enumeration:
ACase = 0
RCombo = 1
This item indicates if the associated CName item is an analysis case (ACase) or a response combination (RCombo).
CName
This is an array of the names of the analysis cases or response combinations included in the response combination specified by the Name item.
SF
The scale factor multiplying the case or combination indicated by the CName item.
This function returns all analysis cases and response combinations included in the response combination specified by the Name item.
The function returns zero if the data is successfully retrieved, otherwise it returns a nonzero value.
Sub GetCasesInCombo()
'dimension variables
Dim SapObject As Sap2000.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim CType() As eCType
Dim CName() As String
Dim SF() As Double
'create Sap2000 object
Set SapObject = New SAP2000.SapObject
'start Sap2000 application
SapObject.ApplicationStart
'create SapModel object
Set SapModel = SapObject.SapModel
'initialize model
ret = SapModel.InitializeNewModel
'create model from template
ret = SapModel.File.New2DFrame(PortalFrame,
3, 124, 3, 200)
'add combo
ret = SapModel.RespCombo.Add("COMB1",
0)
'add analysis case to combo
ret = SapModel.RespCombo.SetCaseList("COMB1",
ACase, "DEAD", 1.4)
'get all cases and combos included in combo COMB1
ret = SapModel.RespCombo.GetCaseList("COMB1",
NumberItems, CType, CName, SF)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Initial release in version 11.00.