SetNZS11702004_1

SetNZS11702004_1

Syntax

SapObject.SapModel.Func.FuncRS.SetNZS11702004_1

VB6 Procedure

Function SetNZS11702004_1(ByVal Name As String, ByRef NZS2004SpectrumType As Long, ByVal NZS2004SiteClass As Long, ByVal NZS2004Z As Double, ByVal NZS2004R As Double, ByVal NZS2004DIST As Double, ByVal NZS2004ConsiderTSite As Boolean, ByVal NZS2004TSite As Double, ByVal DampRatio As Double) As Long

Parameters

Name

The name of an existing or new function. If this is an existing function, that function is modified; otherwise, a new function is added.

NZS2004SpectrumType

This is 1 or 2, indicating the spectrum type.

1 = Horizontal

2 = Vertical

NZS2004SiteClass

This is 1, 2, 3, 4 or 5, indicating the site class.

1 = A

2 = B

3 = C

4 = D

5 = E

NZS2004Z

The hazard factor, Z.

NZS2004R

The return period factor, R.

NZS2004DIST

Distance to the fault in kim, used to calculate the near fault factor.

NZS2004ConsiderTSite

Indicates whether to consider the site period for the spectral shape factor.

NZS2004TSite

The low amplitude site period.

DampRatio

The damping ratio for the function, 0 <= DampRatio < 1.

Remarks

This function defines an NZS 1170.5 2004 response spectrum function.

The function returns zero if the function is successfully defined; otherwise it returns a nonzero value.

VBA Example

Sub SetRSFuncNZS11702004()

'dimension variables

Dim SapObject as cOAPI

Dim SapModel As cSapModel

Dim ret As Long

'create Sap2000 object

Set SapObject = CreateObject("CSI.SAP2000.API.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 NZS 1170 2004 RS function

ret = SapModel.Func.FuncRS.SetNZS11702004_1("RS-1", 1, 3, 0.4, 1.3, 20, True, 1, 0.04)

'close Sap2000

SapObject.ApplicationExit False

Set SapModel = Nothing

Set SapObject = Nothing

End Sub

Release Notes

Initial release in v21.0.0.

This function supersedes 
SetNZS11702004

See Also

GetNZS11702004_1