Count {Load Pattern}

Count

Syntax

SapObject.SapModel.LoadPatterns.Count

VB6 Procedure

Function Count() As Long

Parameters

None

Remarks

The function returns the number of defined load patterns.

VBA Example

Sub CountLoadPatterns()

'dimension variables

Dim SapObject as cOAPI

Dim SapModel As cSapModel

Dim ret as Long

'create Sap2000 object

Set SapObject = New Sap2000v16.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)

'get number of defined load patterns

ret = SapModel.LoadPatterns.Count

'close Sap2000

SapObject.ApplicationExit False

Set SapModel = Nothing

Set SapObject = Nothing

End Sub

Release Notes

Initial release in version 11.00.

Changed nomenclature from Load Cases, Analysis Cases and Response Combinations to Load Patterns, Load Cases and Load Combinations, respectively, in version 12.00.

See Also