cFileOpenFile Method

Opens an existing file.

Namespace:  ETABS2016
Assembly:  ETABS2016 (in ETABS2016.dll) Version: 16.0.0.0 (16.0.0.0)
Syntax
int OpenFile(
	string FileName
)

Parameters

FileName
Type: SystemString
The full path of a model file to be opened in the application.

Return Value

Type: Int32
Returns zero if the file is successfully opened and nonzero if it is not opened.
Remarks
Examples
VB
Public Sub Example()
       Dim SapModel As cSapModel
       Dim EtabsObject As cOAPI
       Dim FileName as String
       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()

   'open an existing file - If no file exists, run the Save example first.
       FileName = "c:\CSI_API_temp\example.edb"
       ret = SapModel.File.OpenFile(FileName)

   'close ETABS
       EtabsObject.ApplicationExit(False)

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