240 likes | 422 Views
Programming with GSA APIs. An introduction to the COM interface Ramaseshan Kannan. An imaginary scenario…. Overview. Introduction Assumptions Elements of the API Using the API Documentation and support Examples and case study. Introduction. What are GSA APIs?
E N D
Programming with GSA APIs An introduction to the COM interface Ramaseshan Kannan
Overview • Introduction • Assumptions • Elements of the API • Using the API • Documentation and support • Examples and case study
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?
Assumptions • Some understanding of programming assumed. • VB.NET vs. Excel VBA • Visual Studio Express • Scope of this presentation
Elements of the COM API • Functions • Core functions • View functions • Data and ‘Tools’ functions • Case and Task functions • List functions • GwaCommand • Output functions
Elements of the COM API • Functions • GwaCommand • Output functions
A simple example Exercise: In an existing model, create a point load on a beam and analyse it.
A closer look Initialize the GSA COM object Dim gsaObj AsNew Gsa_8_5.ComAuto Open File gsaObj.Open("C:\GSA Files\COM tests\Env.gwb")
A closer look Delete results gsaObj.Delete("RESULTS") Call GwaCommand gsaObj.GwaCommand("LOAD_BEAM_POINT, 2, 1, GLOBAL, NO, Z, -.5, -2")
A closer look Analyse all tasks gsaObj.Analyse() Save model gsaObj.Save() Close file gsaObj.Close()
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
Wrappers • .NET Sample • GsaComUtil class
Wrappers • DesignLink GsaControllerclass
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?
COM: programming with GSA Case studies
Design and optimisation of freeform high-rise truss façade structures
Design and optimisation of freeform high-rise truss façade structures