Top Banner
www.oasys- software.com Programming with GSA APIs An introduction to the COM interface Ramaseshan Kannan
23

Www.oasys-software.com Programming with GSA APIs An introduction to the COM interface Ramaseshan Kannan.

Dec 30, 2015

Download

Documents

Sara Pearson
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Www.oasys-software.com Programming with GSA APIs An introduction to the COM interface Ramaseshan Kannan.

www.oasys-software.com

Programming with GSA APIs

An introduction to the COM interface

Ramaseshan Kannan

Page 2: Www.oasys-software.com Programming with GSA APIs An introduction to the COM interface Ramaseshan Kannan.

www.oasys-software.com

An imaginary scenario…

Page 3: Www.oasys-software.com Programming with GSA APIs An introduction to the COM interface Ramaseshan Kannan.

www.oasys-software.com

Overview

• Introduction

• Assumptions

• Elements of the API

• Using the API

• Documentation and support

• Examples and case study

Page 4: Www.oasys-software.com Programming with GSA APIs An introduction to the COM interface Ramaseshan Kannan.

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?

Page 5: Www.oasys-software.com Programming with GSA APIs An introduction to the COM interface Ramaseshan Kannan.

www.oasys-software.com

Page 6: Www.oasys-software.com Programming with GSA APIs An introduction to the COM interface Ramaseshan Kannan.

www.oasys-software.com

Assumptions

• Some understanding of programming assumed.

• VB.NET vs. Excel VBA• Visual Studio Express

• Scope of this presentation

Page 7: Www.oasys-software.com Programming with GSA APIs An introduction to the COM interface Ramaseshan Kannan.

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

Page 8: Www.oasys-software.com Programming with GSA APIs An introduction to the COM interface Ramaseshan Kannan.

www.oasys-software.com

Elements of the COM API

• Functions

• GwaCommand

• Output functions

Page 9: Www.oasys-software.com Programming with GSA APIs An introduction to the COM interface Ramaseshan Kannan.

www.oasys-software.com

A simple example

Exercise: In an existing model, create a point load on a beam and analyse it.

Page 10: Www.oasys-software.com Programming with GSA APIs An introduction to the COM interface Ramaseshan Kannan.

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")

Page 11: Www.oasys-software.com Programming with GSA APIs An introduction to the COM interface Ramaseshan Kannan.

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")

Page 12: Www.oasys-software.com Programming with GSA APIs An introduction to the COM interface Ramaseshan Kannan.

www.oasys-software.com

A closer look

Analyse all tasks

gsaObj.Analyse()

Save model

gsaObj.Save()

Close file

gsaObj.Close()

Page 13: Www.oasys-software.com Programming with GSA APIs An introduction to the COM interface Ramaseshan Kannan.

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

Page 14: Www.oasys-software.com Programming with GSA APIs An introduction to the COM interface Ramaseshan Kannan.

www.oasys-software.com

Wrappers

• .NET Sample• GsaComUtil class

Page 15: Www.oasys-software.com Programming with GSA APIs An introduction to the COM interface Ramaseshan Kannan.

www.oasys-software.com

Wrappers

• DesignLink

GsaController class

Page 16: Www.oasys-software.com Programming with GSA APIs An introduction to the COM interface Ramaseshan Kannan.

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?

Page 17: Www.oasys-software.com Programming with GSA APIs An introduction to the COM interface Ramaseshan Kannan.

www.oasys-software.com

CASE STUDIESCOM: programming with GSA

Page 18: Www.oasys-software.com Programming with GSA APIs An introduction to the COM interface Ramaseshan Kannan.

www.oasys-software.com

Design and optimisation of freeform high-rise truss façade structures

Page 19: Www.oasys-software.com Programming with GSA APIs An introduction to the COM interface Ramaseshan Kannan.

www.oasys-software.com

Design and optimisation of freeform high-rise truss façade structures

Page 20: Www.oasys-software.com Programming with GSA APIs An introduction to the COM interface Ramaseshan Kannan.

www.oasys-software.com

Marina Bay Sands

Page 21: Www.oasys-software.com Programming with GSA APIs An introduction to the COM interface Ramaseshan Kannan.

www.oasys-software.com

Infinity Footbridge

Page 22: Www.oasys-software.com Programming with GSA APIs An introduction to the COM interface Ramaseshan Kannan.

www.oasys-software.com

Geometry Gym

Page 23: Www.oasys-software.com Programming with GSA APIs An introduction to the COM interface Ramaseshan Kannan.

www.oasys-software.com