OpenSees and VBA

Forum for OpenSees users to post questions, comments, etc. on the use of the OpenSees interpreter, OpenSees.exe

Moderators: silvia, selimgunay, Moderators

Post Reply
Toutant
Posts: 32
Joined: Mon Sep 09, 2013 10:33 am
Location: École Polytechnique de Montréal

OpenSees and VBA

Post by Toutant »

Dear all,

Is it possible to launch an OpenSees analysis using an Excel VBA script? I know it's possible with Matlab but I would prefer directly with a VBA script.

I created a spreadsheet to design CBF frames that executes SAP2000 analysis through a VBA script but I would like to add non-linear analysis with OpenSees.

Thanks.
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: OpenSees and VBA

Post by fmk »

if you can call SAP it means you can call any external program, so OpenSees should be able to be called as well.
johnnyontheweb
Posts: 46
Joined: Sat Oct 08, 2011 6:28 am

Re: OpenSees and VBA

Post by johnnyontheweb »

Sap has APIs for Vba.
Can the opensees apis be called from vba or .net?
Toutant
Posts: 32
Joined: Mon Sep 09, 2013 10:33 am
Location: École Polytechnique de Montréal

Re: OpenSees and VBA

Post by Toutant »

I was able to call OpenSees.exe from VBA but I couldn't send him commands e.g. source filename.tcl

What I ended up doing is making a VBA macro to execute a matlab script (.m file). In that script, I perform an OpenSees analysis using "!OpenSees.exe filename.tcl". Note that this matlab script can take input from Excel using xlsread command in matlab. Finally I extract results from Matlab back into my excel spreadsheet using Matlab API functions.
johnnyontheweb
Posts: 46
Joined: Sat Oct 08, 2011 6:28 am

Re: OpenSees and VBA

Post by johnnyontheweb »

There is not what I intended. An API allows you to call the function inside OS.
Post Reply