SapObject.SapModel.Analyze.CreateAnalysisModel
Function CreateAnalysisModel() As Long
None
This function creates the analysis model. If the analysis model is already created and current, nothing is done.
The function returns zero if the analysis model is successfully created or it already exists and is current, otherwise it returns a nonzero value.
It is not necessary to call this function before running an analysis. The analysis model is automatically created, if necessary, when the model is run.
Sub CreateSapAnalysisModel()
'dimension variables
Dim SapObject As Sap2000.SapObject
Dim SapModel As cSapModel
Dim ret As Long
'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)
'create the analysis model
ret = SapModel.Analyze.CreateAnalysisModel
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Initial release in version 11.00.