Upload
sara-pearson
View
254
Download
8
Embed Size (px)
Citation preview
www.oasys-software.com
Programming with GSA APIs
An introduction to the COM interface
Ramaseshan Kannan
www.oasys-software.com
An imaginary scenario…
www.oasys-software.com
Overview
• Introduction
• Assumptions
• Elements of the API
• Using the API
• Documentation and support
• Examples and case study
www.oasys-software.com
Introduction
• What are GSA APIs?• An alternate route to access existing functionality.
• What can they be used for?
• Where do I access this functionality?
• How do I get started?
www.oasys-software.com
www.oasys-software.com
Assumptions
• Some understanding of programming assumed.
• VB.NET vs. Excel VBA• Visual Studio Express
• Scope of this presentation
www.oasys-software.com
Elements of the COM API
• Functions• Core functions • View functions • Data and ‘Tools’ functions • Case and Task functions • List functions • GwaCommand• Output functions
www.oasys-software.com
Elements of the COM API
• Functions
• GwaCommand
• Output functions
www.oasys-software.com
A simple example
Exercise: In an existing model, create a point load on a beam and analyse it.
www.oasys-software.com
A closer look
Initialize the GSA COM objectDim gsaObj As New Gsa_8_5.ComAuto
Open FilegsaObj.Open("C:\GSA Files\COM tests\Env.gwb")
www.oasys-software.com
A closer look
Delete results
gsaObj.Delete("RESULTS")
Call GwaCommand
gsaObj.GwaCommand("LOAD_BEAM_POINT, 2, 1, GLOBAL, NO, Z, -.5, -2")
www.oasys-software.com
A closer look
Analyse all tasks
gsaObj.Analyse()
Save model
gsaObj.Save()
Close file
gsaObj.Close()
www.oasys-software.com
Documentation and resources
• Help File
• Gwa.html <C:\Program Files (x86)\Oasys\GSA 8.5\Docs\gwa.html>
• Samples under <C:\Program Files (x86)\Oasys\GSA 8.5\Samples\API_and_GWC>
• .NET sample• VBA sample• C++ sample
www.oasys-software.com
Wrappers
• .NET Sample• GsaComUtil class
www.oasys-software.com
Wrappers
• DesignLink
GsaController class
www.oasys-software.com
Future directions…
• 8.x• Functions for creating/querying Views and lists.• Result extraction as a Vector.
• 9.0• .NET based APIs…• New object model…• Cuter…
• More COM training?
www.oasys-software.com
CASE STUDIESCOM: programming with GSA
www.oasys-software.com
Design and optimisation of freeform high-rise truss façade structures
www.oasys-software.com
Design and optimisation of freeform high-rise truss façade structures
www.oasys-software.com
Marina Bay Sands
www.oasys-software.com
Infinity Footbridge
www.oasys-software.com
Geometry Gym
www.oasys-software.com