SetCaseList



Your Ad Here

Syntax

SapObject.SapModel.RespCombo.SetCaseList

VB6 Procedure

Function SetCaseList(ByVal Name As String, CType As eCType, ByVal CName As String, ByVal SF As Double) As Long

Parameters

Name

The name of an existing response combination.

CType

This is one of the following items in the eCType enumeration:

ACase = 0

RCombo = 1

 

This item indicates if the CName item is an analysis case (ACase) or a response combination (RCombo).

CName

The name of the analysis case or response combination to be added to or modified in the combination specified by the Name item. If the analysis case or combination already exists in the combination specified by the Name item, the scale factor is modified as indicated by the SF item for that analysis case or combination. If the analysis case or combination does not exist in the combination specified by the Name item, it is added.

SF

The scale factor multiplying the case or combination indicated by the CName item.

Remarks

This function adds or modifies one analysis case or response combination in the list of cases included in the response combination specified by the Name item.

The function returns zero if the item is successfully added or modified, otherwise it returns a nonzero value.

VBA Example

Sub AddCaseToCombo()
   'dimension variables
      Dim SapObject As Sap2000.SapObject
      Dim SapModel As cSapModel
      Dim ret As Long

   '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)

   'close Sap2000
      SapObject.ApplicationExit False
      Set SapModel = Nothing
      Set SapObject = Nothing
End Sub

Release Notes

Initial release in version 11.00.

See Also

GetCaseList

Return to SAP2000 Index


Your Ad Here