how to write data in an out 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
cicilixiaoran
Posts: 26
Joined: Sun Aug 16, 2009 11:30 pm
Location: beijing jiaotong university

how to write data in an out file?

Post by cicilixiaoran »

Dear vesna,

Thank you for your help.

set outFileID [open filetoread.out "r"]
set b [read $outFileID]
close $outFileID
set a [lindex $b 1]
puts "a is $a"
Through the above command, I can get the second data "a" in the first lode step. That puts "a is $a" is putting out to the screen, if I want to write it in a new out file "strain.out", how to do it? And the next load step, I get the filetoread.out again, and get a second data "a" again from the filetoread.out, I want write it in this strain.out again. Finally, in the strain.out file, I can get all second data "a" from the filetoread.out generated from every load step. How to do it? Thank you.

Best regards

cicilixiaoran
vesna
Posts: 3033
Joined: Tue May 23, 2006 11:23 am
Location: UC Berkeley

Post by vesna »

Look for my response in your earlier post.
cicilixiaoran
Posts: 26
Joined: Sun Aug 16, 2009 11:30 pm
Location: beijing jiaotong university

Post by cicilixiaoran »

Dear vesna,

I successfully do it according to your suggestion.Thank you very much!
:)
Best regards
cicilixiaoran
Post Reply