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 » Fri Jan 02, 2015 7:41 pm

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: 5883
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: OpenSees and VBA

Post by fmk » Mon Jan 05, 2015 10:32 am

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: 43
Joined: Sat Oct 08, 2011 6:28 am

Re: OpenSees and VBA

Post by johnnyontheweb » Sat Jan 10, 2015 12:26 pm

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 » Sat Jan 10, 2015 12:36 pm

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: 43
Joined: Sat Oct 08, 2011 6:28 am

Re: OpenSees and VBA

Post by johnnyontheweb » Tue Jan 13, 2015 1:35 pm

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

Post Reply