Attaching to a Manually Started Instance of ETABS

Attaching to a Manually Started Instance of ETABS

These instructions document the steps necessary to attach to instances of ETABS that were started manually. The example code is in VB.NET.

Attaching to a Manually Started Instance of ETABS

  • Start ETABS manually, e.g. by clicking on the program shortcut.
  • Instead of creating a new ETABSObject, attach to the instance of the ETABSObject that was created and added to the Running Object Table by ETABS. The code below creates an ETABSObject and starts the program:

 

Dim myETABSObject As ETABS2016.cOAPI
Dim myHelper as ETABS2016.cHelper = New ETABS2016.Helper myETABSObject = myHelper.CreateObject(“C:\Program Files (x86)\Computers and Structures\ETABS 2016\ETABS.exe”)
ret = myETABSObject.ApplicationStart()
Dim mySapModel As ETABS2016.cSapModel = myETABSObject.SapModel
  1. Replace the code above with the code below to attach to the existing ETABSObject. Since the program is already started, there is no need to call ETABSObject.ApplicationStart:

Dim myETABSObject As ETABS2016.cOAPI myETABSObject = DirectCast(GetObject( , “CSI.ETABS.API.ETABSObject”), ETABS2016.cOAPI) Dim mySapModel As ETABS2016.cSapModel = myETABSObject.SapModel

Attaching to a Manually Started Instance of ETABS

  • Other calls can then be made normally. The program can be ended manually or by calling ETABSObject.ApplicationExit
  • Please note that if multiple instances of ETABS are manually started, an API client can only attach to the instance that was started first
This entry was posted in ETABS API. Bookmark the permalink.

Leave a Reply