get an "output file"

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

Moderators: silvia, selimgunay, Moderators

Post Reply
nahid2011
Posts: 74
Joined: Thu Jun 02, 2011 5:50 am
Location: OPS structures company

get an "output file"

Post by nahid2011 »

Dear sir or Madam

In my program I compute the modal masses and then I put them in a vector named modalmasses, with "lappend" command.
so modalmasses is a vector.
by "for loop" and "puts" commands I can see the results in the screen but;
How I can get an "output file" from a vector that I've built my self in the grogram.


thanxs so much

best wishes
evxjr
Posts: 20
Joined: Mon Nov 01, 2010 4:13 am
Location: University of Nottingham

Re: get an "output file"

Post by evxjr »

you can use a standard script for writing to a file

set modeMassFile [open "Modal Masses.txt" a]; # Creates a new file called "Modal Masses.txt" sets it ready for writing and links it to a variable
puts $modeMassFile $modalmasses; # Writes $modamasses to the file
close $modeMassFile; # Closes the file again
nahid2011
Posts: 74
Joined: Thu Jun 02, 2011 5:50 am
Location: OPS structures company

Re: get an "output file"

Post by nahid2011 »

thanks alot
Post Reply