GetNZS11702004_1

GetNZS11702004_1

Syntax

SapObject.SapModel.Func.FuncRS.GetNZS11702004_1

VB6 Procedure

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

Parameters

Name

The name of a NZS 1170 2004 response spectrum function.

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 km, 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 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 NZS2004SpectrumType As Long

Dim NZS2004SiteClass As Long

Dim NZS2004Z As Double

Dim NZS2004R As Double

Dim NZS2004DIST As Double

Dim NZS2004ConsiderTSite As Boolean

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

'get NZS 1170 2004 RS function

ret = SapModel.Func.FuncRS.GetNZS11702004_1("RS-1", NZS2004SpectrumType, NZS2004SiteClass, NZS2004Z, NZS2004R, NZS2004DIST, NZS2004ConsiderTSite, NZS2004TSite, DampRatio)

'close Sap2000

SapObject.ApplicationExit False

Set SapModel = Nothing

Set SapObject = Nothing

End Sub

Release Notes

Initial release in v21.0.0.

This function supersedes 
GetNZS11702004

See Also

SetNZS11702004_1