(Solved) – How to write a code to an program from VBA excel?

  • by

I have a code is written by excel VBA. I need to enter it to the OpenSees program. OpenSees is a Command-line interface program and it looks like this

I am opening the OpenSees using the following code

Call Shell("C:UserssalrubayeDownloadsOpenSees3.1.0-x64.exebinOpenSees.exe", vbNormalFocus)

My question, Is there a possible way to copy txt file or cells and submit it to the OpenSees using VBA code?
I have two options to run the OpenSees program.

1-enter the code to Opeensees.
Below is an example for a part of the code

model BasicBuilder -ndm 2 -ndf 3;
set dataDir Data;
file mkdir $dataDir/;           
set GMdir "../GMfiles";         

2- call a tcl file. The code for that

source anyname.tcl

Leave a Reply

Your email address will not be published. Required fields are marked *