cSapModelInitializeNewModel Method

This function clears the previous model and initializes the program for a new model. If it is later needed, you should save your previous model prior to calling this function.

Namespace:  ETABS2016
Assembly:  ETABS2016 (in ETABS2016.dll) Version: 16.0.0.0 (16.0.0.0)
Syntax
int InitializeNewModel(
	eUnits Units = eUnits.kip_in_F
)

Parameters

Units (Optional)
Type: ETABS2016eUnits
This is the display (present) units for the new model. Possible items in the eUnits enumeration.

All numerical items are shown in the GUI in display units. All API calls use display units.

All data stored internally in the model is in database units. If the length unit in the display units is inch or feet, the database units will be set to lb_in_F. Otherwise, the database units are set to N_mm_C.

Return Value

Type: Int32
The function returns zero if a new model is successfully initialized, otherwise it returns a nonzero value.
Remarks
After calling the InitializeNewModel function, it is not necessary to also call the ApplicationStart function because the functionality of the ApplicationStart function is included in the InitializeNewModel function.
Examples
VB
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 model (this will create the analysis model)
       ret = SapModel.Analyze.RunAnalysis

   'close ETABS
       EtabsObject.ApplicationExit(False)

   'clean up variables
       SapModel = Nothing
       EtabsObject = Nothing
   End Sub
See Also