cSapModelGetModelFilename Method

Returns a string that represents the filename of the current model, with or without the full path.

Namespace:  ETABS2016
Assembly:  ETABS2016 (in ETABS2016.dll) Version: 16.0.0.0 (16.0.0.0)
Syntax
string GetModelFilename(
	bool IncludePath = true
)

Parameters

IncludePath (Optional)
Type: SystemBoolean
A boolean (True or False) value. When this item is True, the returned filename includes the full path where the file is located.

Return Value

Type: String
Returns a string that represents the filename of the current model, with or without the full path.
Remarks
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

   'save the model
       ret = SapModel.File.Save("C:\CSI_API_temp\API_1-001.edb")

   'display the filename of the model
       MsgBox(SapModel.GetModelFilename())

   'close ETABS
       EtabsObject.ApplicationExit(False)

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