0% found this document useful (0 votes)
680 views1 page

ETABS OAPI: Create and Save New Model

This document provides an example Visual Basic script for creating a new model in ETABS using the object application programming interface (OAPI). The script initializes a new ETABS OAPI object, starts an ETABS session, initializes a new blank model with specified units, creates a new blank file, allows performing additional actions on the model, saves the model to a file path, exits the ETABS session, and clears the OAPI objects. The script demonstrates the basic process for programmatically generating a new ETABS model file using the OAPI.

Uploaded by

Henry Hoyos
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
680 views1 page

ETABS OAPI: Create and Save New Model

This document provides an example Visual Basic script for creating a new model in ETABS using the object application programming interface (OAPI). The script initializes a new ETABS OAPI object, starts an ETABS session, initializes a new blank model with specified units, creates a new blank file, allows performing additional actions on the model, saves the model to a file path, exits the ETABS session, and clears the OAPI objects. The script demonstrates the basic process for programmatically generating a new ETABS model file using the OAPI.

Uploaded by

Henry Hoyos
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

[Link]

com/2013/08/27/etabs-oapi-how-to-get-started/

Sub template_New_model()

' EXAMPLE: Creating a new model and save it

Dim ret As Long ' return value from OAPI calls

Dim filename As String

filename = "C:\[Link]"

Dim myEtabs As [Link] ' the OAPI class has methods related to high level
program stuff, like .applicationStart()

Dim myModel As [Link] ' the SapModel class is where most things we are
interested in reside

' Create the OAPI object

Set myEtabs = CreateObject("[Link]") ' Create the OAPI object

' Start ETABS

[Link]

' Assign the resulting SAP model

myModel = [Link]

' Initialise a new model

[Link] (eUnits_kN_m_C) ' Initialize a new model with units)

' Create a new model file

ret = [Link] ' actually create the blank file

' DO STUFF

'Save the file

ret = [Link](filename) ' save the model

' close ETABS

ret = [Link](False) ' exit ETABS

Set myModel = Nothing

Set myEtabs = Nothing

End Sub

You might also like