SapObject.SapModel.View.RefreshWindow
Function RefreshWindow(Optional ByVal Window As Long = 0) As Long
Window
This is 0 meaning all windows or an existing window number. It indicates the window(s) to be refreshed.
This function refreshes the specified window(s). It returns zero if the windows are successfully refreshed, otherwise it returns a nonzero value.
See RefreshWindow and RefreshView for more information.
Sub RefreshAllWindows()
'dimension variables
Dim SapObject As Sap2000.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim Value() As Boolean
'create Sap2000 object
Set SapObject = New SAP2000.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 joint restraint
Redim Value(5)
For i = 0 to 5
Value(i) = True
Next i
ret = SapModel.PointObj.SetRestraint("1",
Value)
'refresh all windows
ret = SapModel.View.RefreshWindow
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Initial release in version 11.00.