SetLoadType

SetLoadType

Syntax

SapObject.SapModel.LoadPatterns.SetLoadType

VB6 Procedure

Function SetLoadType(ByVal Name As String, ByVal MyType As eLoadPatternType) As Long

Parameters

Name

The name of an existing 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

Remarks

This function assigns a load type to a load pattern.

The function returns zero if the load type is successfully assigned; otherwise it returns a nonzero value.

VBA Example

Sub AssignLoadType()

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

'assign load type

ret = SapModel.LoadPatterns.SetLoadType("DEAD", LTYPE_SUPERDEAD)

'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

GetLoadType