SetNZS11702004

SetNZS11702004

Syntax

SapObject.SapModel.Func.FuncRS.SetNZS11702004

VB6 Procedure

Function SetNZS11702004(ByVal Name As String, ByVal NZS2004SiteClass As Long, ByVal NZS2004Z As Double, ByVal NZS2004R As Double, ByVal NZS2004DIST 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.

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.

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("RS-1", 3, 0.4, 1.3, 20, 0.04)

'close Sap2000

SapObject.ApplicationExit False

Set SapModel = Nothing

Set SapObject = Nothing

End Sub

Release Notes

Initial release in version 14.00.

Modified NZS2004N to NZS2004DIST in version 14.1.0.

See Also

GetNZS11702004