Count {Frame Releases}

Count

Syntax

SapObject.SapModel.NamedAssign.ReleaseFrame.Count

VB6 Procedure

Function Count() As Long

Parameters

None

Remarks

This function returns the total number of defined frame end releases in the model.

VBA Example

Sub CountFrameEndReleases()

'dimension variables

Dim SapObject as cOAPI

Dim SapModel As cSapModel

Dim ret As Long

Dim Count As Long

Dim ii() As Boolean

Dim jj() As Boolean

Dim StartValue() As Double

Dim EndValue() 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, 3, 124, 3, 200)

'add new end release

ReDim ii(5)

ReDim jj(5)

ReDim StartValue(5)

ReDim EndValue(5)

ii(0) = True

StartValue(0) = 10

ret = SapModel.NamedAssign.ReleaseFrame.SetReleases("FREL1", ii, jj, StartValue, EndValue)

ii(0) = False

StartValue(0) = 0

ii(5) = True

jj(5) = True

ret = SapModel.NamedAssign.ReleaseFrame.SetReleases("FREL2", ii, jj, StartValue, EndValue)

'return number of defined end releases

Count = SapModel.NamedAssign.ReleaseFrame.Count

'close Sap2000

SapObject.ApplicationExit False

Set SapModel = Nothing

Set SapObject = Nothing

End Sub

Release Notes

Initial release in version 12.00.

See Also