GetNZS11702004

GetNZS11702004

Syntax

SapObject.SapModel.Func.FuncRS.GetNZS11702004

VB6 Procedure

Function GetNZS11702004(ByVal Name As String, ByVal NZS2004SiteClass As Long, ByVal NZS2004Z As Double, ByVal NZS2004R As Double, ByVal NZS2004DIST As Double, ByRef DampRatio As Double) As Long

Parameters

Name

The name of a NZS 1170 2004 response spectrum function.

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 km, used to calculate the near fault factor.

DampRatio

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

Remarks

This function retrieves the definition of an NZS 1170 2004 response spectrum function.

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

VBA Example

Sub GetRSFuncNZS11702004()

'dimension variables

Dim SapObject as cOAPI

Dim SapModel As cSapModel

Dim ret As Long

Dim NZS2004SiteClass As Long

Dim NZS2004Z As Double

Dim NZS2004R As Double

Dim NZS2004DIST As Double

Dim DampRatio As Double

'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)

'get NZS 1170 2004 RS function

ret = SapModel.Func.FuncRS.GetNZS11702004("RS-1", NZS2004SiteClass, NZS2004Z, NZS2004R, NZS2004DIST, DampRatio)

'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

SetNZS11702004