cAnalyzeRunAnalysis Method |
Namespace: ETABS2016
IMPORTANT NOTE: Your model must have a file path defined before running the analysis. If the model is opened from an existing file, a file path is defined. If the model is created from scratch, the File.Save function must be called with a file name before running the analysis. Saving the file creates the file path.
Public Sub Example() Dim SapModel As cSapModel Dim EtabsObject As cOAPI Dim ret As Integer = -1 'create ETABS object EtabsObject = CreateObject("CSI.ETABS.API.ETABSObject") 'start ETABS application ret = EtabsObject.ApplicationStart() 'create SapModel object SapModel = EtabsObject.SapModel 'initialize model ret = SapModel.InitializeNewModel() 'create steel deck template model ret = SapModel.File.NewSteelDeck(4,12,12,4,4,24,24) 'run analysis System.IO.Directory.CreateDirectory("c:\CSI_API_temp") ret = SapModel.File.Save("C:\CSI_API_temp\example.edb") ret = SapModel.Analyze.RunAnalysis 'close ETABS EtabsObject.ApplicationExit(False) 'clean up variables SapModel = Nothing EtabsObject = Nothing End Sub