Add {Load Pattern}

Add

Syntax

SapObject.SapModel.LoadPatterns.Add

VB6 Procedure

Function Add(ByVal Name As String, ByVal MyType As eLoadPatternType, Optional ByVal SelfWTMultiplier As Double = 0, Optional ByVal AddLoadCase As Boolean = True) As Long

Parameters

Name

The name for the new load pattern.

MyType

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

LTYPE_DEAD = 1

LTYPE_SUPERDEAD = 2

LTYPE_LIVE = 3

LTYPE_REDUCELIVE = 4

LTYPE_QUAKE = 5

LTYPE_WIND= 6

LTYPE_SNOW = 7

LTYPE_OTHER = 8

LTYPE_MOVE = 9

LTYPE_TEMPERATURE = 10

LTYPE_ROOFLIVE = 11

LTYPE_NOTIONAL = 12

LTYPE_PATTERNLIVE = 13

LTYPE_WAVE= 14

LTYPE_BRAKING = 15

LTYPE_CENTRIFUGAL = 16

LTYPE_FRICTION = 17

LTYPE_ICE = 18

LTYPE_WINDONLIVELOAD = 19

LTYPE_HORIZONTALEARTHPRESSURE = 20

LTYPE_VERTICALEARTHPRESSURE = 21

LTYPE_EARTHSURCHARGE = 22

LTYPE_DOWNDRAG = 23

LTYPE_VEHICLECOLLISION = 24

LTYPE_VESSELCOLLISION = 25

LTYPE_TEMPERATUREGRADIENT = 26

LTYPE_SETTLEMENT = 27

LTYPE_SHRINKAGE = 28

LTYPE_CREEP = 29

LTYPE_WATERLOADPRESSURE = 30

LTYPE_LIVELOADSURCHARGE = 31

LTYPE_LOCKEDINFORCES = 32

LTYPE_PEDESTRIANLL = 33

LTYPE_PRESTRESS = 34

LTYPE_HYPERSTATIC = 35

LTYPE_BOUYANCY = 36

LTYPE_STREAMFLOW = 37

LTYPE_IMPACT = 38

LTYPE_CONSTRUCTION = 39

SelfWTMultiplier

The self weight multiplier for the new load pattern.

AddLoadCase

If this item is True, a linear static load case corresponding to the new load pattern is added.

Remarks

This function adds a new load pattern.

The function returns 0 if the load pattern is successfully added; otherwise it returns nonzero. An error is returned if the Name item is already used for an existing load pattern.

VBA Example

Sub AddNewLoadPattern()

'dimension variables

Dim SapObject as cOAPI

Dim SapModel As cSapModel

Dim ret As Long

Dim NumberAreas As Long

Dim AreaName() As String

'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, 2, 144, 2, 288)

'add new load pattern

ret = SapModel.LoadPatterns.Add("LIVE", LTYPE_LIVE)

'close Sap2000

SapObject.ApplicationExit False

Set SapModel = Nothing

Set SapObject = Nothing

End Sub

Release Notes

Initial release in version 11.01.

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

Added three items to the eLoadPatternType enumeration in version 12.00.

See Also