0% found this document useful (0 votes)
6K views

CSi OAPI Documentation - CHM SAP2000 API Fuctions General Functions ApplicationStart PDF

The ApplicationStart function starts the Sap2000 application. It has optional parameters for the database units, whether the application is visible, and a file name to open. The function returns a non-zero value if the application fails to start. It can start a new model or open an existing file in various formats like SDB, S2K, XLS, or MDB. See Also lists related functions for exiting the application, opening files, and initializing new models.

Uploaded by

Adel Osman
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6K views

CSi OAPI Documentation - CHM SAP2000 API Fuctions General Functions ApplicationStart PDF

The ApplicationStart function starts the Sap2000 application. It has optional parameters for the database units, whether the application is visible, and a file name to open. The function returns a non-zero value if the application fails to start. It can start a new model or open an existing file in various formats like SDB, S2K, XLS, or MDB. See Also lists related functions for exiting the application, opening files, and initializing new models.

Uploaded by

Adel Osman
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

ApplicationStart

Page 1 of 2

ApplicationStart
Syntax
SapObject.ApplicationStart

VB6 Procedure
Function ApplicationStart(Optional ByVal Units As eUnits = kip_in_F, Optional ByVal Visible As Boolean = True, Optional ByVal FileName As String = "") As Long

Parameters
Units The database units used when a new model is created. Data is internally stored in the program in the database units. The database units may be one of the following items in the eUnits enumeration: lb_in_F = 1 lb_ft_F = 2 kip_in_F = 3 kip_ft_F = 4 kN_mm_C = 5 kN_m_C = 6 kgf_mm_C = 7 kgf_m_C = 8 N_mm_C = 9 N_m_C = 10 Ton_mm_C = 11 Ton_m_C = 12 kN_cm_C = 13 kgf_cm_C = 14 N_cm_C = 15 Ton_cm_C = 16 Visible If this item is True then the application is visible when started. If it is False then the application is hidden when started. FileName The full path of a model file to be opened when the Sap2000 application is started. If no file name is specified, the application starts without loading an existing model.

Remarks
This function starts the Sap2000 application. When the model is not visible it does not appear on screen and it does not appear in the Windows task bar. If no filename is specified, you can later open a model or create a model through the API. The file name must have an .sdb, .$2k, .s2k, .xls, or .mdb extension. Files with .sdb extensions are opened as standard SAP2000 files. Files with .$2k and .s2k extensions are imported as text files. Files with .xls extensions are imported as Microsoft Excel files. Files with .mdb extensions are imported as Microsoft Access files. This function returns zero if the application successfully starts and nonzero if it fails.

VBA Example
Sub StartExample() 'dimension variables Dim SapObject as Sap2000v15.SapObject Dim ret as Long 'create Sap2000 object Set SapObject = New Sap2000v15.SapObject 'start Sap2000 application ret = SapObject.ApplicationStart

mk:@MSITStore:C:\Users\PC\Desktop\CSi_OAPI_Documentation.chm::/SAP2000_... 14/09/2013

ApplicationStart

Page 2 of 2

'close Sap2000 SapObject.ApplicationExit False Set SapObject = Nothing End Sub

Release Notes
Initial release in version 11.00.

See Also
ApplicationExit OpenFile InitializeNewModel

mk:@MSITStore:C:\Users\PC\Desktop\CSi_OAPI_Documentation.chm::/SAP2000_... 14/09/2013

You might also like