Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

ITERATIONS in calling programs from EXCEL

Status
Not open for further replies.

peppiniello

Structural
Oct 16, 2001
32
who knows how to use an excel macro to launch an analysis program?

i have to perform a parametric structural analysis, and i intend to create an excel sheet whith all the parameters data, with a macro that activates the structural program at each iteration and also copies the output at each step


thanks




 
Replies continue below

Recommended for you

It should not be a problem. We would just need some more information on how the analysis program is run. Is it a standalone program that accepts parameters or is it incorporated in your workbook. Needless to say, you'll have to give more detail before we can start working on a solution. DimensionalSolutions@Core.com
While I welcome e-mail messages, please post all thread activity in these forums for the benefit of all members.
 
Use function
Code:
Shell("C:\programfiles\myapplication.exe")
to run external program within Excel. If your program creates text output file you will have to read it line by line like:
Code:
Dim TextLine
Open "TESTFILE" For Input As #1    ' Open file.
Do While Not EOF(1)    ' Loop until end of file.
    Line Input #1, TextLine    ' Read line into variable.
'analyze Textline using string functions to find the data you need
    Loop
Close #1    ' Close file.
yakov
 
I don't now much how SAP2000 works. In GTSTRUDL there's a way to run program in a batch mode since it's text input file driven program. The command looks like:
Code:
Shell("C:\program files\gtstrudl\gtstrudl.exe inputfile.dat -l outputfile.out")
You need to contact SAP2000 support for syntax and for the key to access the database. Good luck!
 
Hi, anyone knows how to open a zip file(a.xls) from excel macro? Please advice. Thank you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor