sourcing two tcl files in a row with Matlab

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

Moderators: silvia, selimgunay, Moderators

Post Reply
emretoprak
Posts: 3
Joined: Wed Dec 16, 2009 2:21 am
Location: ITU

sourcing two tcl files in a row with Matlab

Post by emretoprak »

I want to make Matlab evaluate opensees.exe, source model02.tcl (which builds the model), and then without exiting opensees, source cycle.tcl (analysis).

When ı type the following commands in matlab, it can not finilize the second tcl since it can not read the variables which were previously defined in first tcl. (see below). because it closes the opensees.exe at the end of first command. Is there any possibility to use such command which executes two tcl files in a row with one command*

Thanks

eval(['!opensees.exe',' ','model02.tcl']);
Cross Section Area =
0.36
Section Second Moment of Inertia =
0.010799999999999997
Young Modulus
32000000.0
Model Built

>> eval(['!opensees.exe',' ','cycle.tcl']);
can't read "LCol": no such variable
while executing
"expr 0.001*$LCol"
invoked from within
"set Dincr [expr 0.001*$LCol]"
(file "cycle.tcl" line 12)
zvidrih
Posts: 39
Joined: Wed Apr 30, 2008 1:55 am
Location: Ljubljana, Slovenia

Re: sourcing two tcl files in a row with Matlab

Post by zvidrih »

Hi,

why don't you simply create a new "main.tcl", which sources both of your files and then evaluate main.tcl in matlab.
Zlatko Vidrih
Institute of Structural Engineering, earthquake Engineering and Construction IT
Faculty of Civil and Geodetic Engineering
University of Ljubljana, Slovenia
emretoprak
Posts: 3
Joined: Wed Dec 16, 2009 2:21 am
Location: ITU

Re: sourcing two tcl files in a row with Matlab

Post by emretoprak »

That idea is more proper.
Action taken! ,
thanks
Post Reply