Hello,
Is there anyway in Opensees (tcl) to create a txt file of the outputs of the opensees screen which includes all the "puts"outcomes?
Thank you,
How can I redirect outputs of screen into a txt file?
Moderators: silvia, selimgunay, Moderators
How can I redirect outputs of screen into a txt file?
Manny Hakhamaneshi
Graduate Student
University of California, Davis
Graduate Student
University of California, Davis
all opensees messages are directed to stderr .. you can use logFile to get them
puts outputs to stdout .. you can direct the puts output to a file usingputs $fileID output, where fileID is a variable set using the open command.
they will not be combined. however if you are on unix you can have both stdout and stderr directed to same file .. google it.
puts outputs to stdout .. you can direct the puts output to a file usingputs $fileID output, where fileID is a variable set using the open command.
they will not be combined. however if you are on unix you can have both stdout and stderr directed to same file .. google it.
logFile & stderr question
Hello Frank and thank you for your previouse responses,
I was able to use outFileID and record the "puts" outputs into a text file however I am still having problem recording the messages that opensees gives and saving the screen outputs using logFile.
I would really appreciate it if you could guide me to use this command or maybe provide me with an example.
Sincerely,
I was able to use outFileID and record the "puts" outputs into a text file however I am still having problem recording the messages that opensees gives and saving the screen outputs using logFile.
I would really appreciate it if you could guide me to use this command or maybe provide me with an example.
Sincerely,
Manny Hakhamaneshi
Graduate Student
University of California, Davis
Graduate Student
University of California, Davis
Hi mannyh,
You can try something like this:
set out [open textOut.txt a]
puts $out "Hello OpenSees!"
...
set a 1
puts $out "the number is $a"
...
close $out
the 'a' stands for 'append'
you can use 'w' to clean up your file
(the 'w' stands for 'write')
example:
set out [open textOut.txt w]
puts $out ""
close $out
______________________
RODAN
You can try something like this:
set out [open textOut.txt a]
puts $out "Hello OpenSees!"
...
set a 1
puts $out "the number is $a"
...
close $out
the 'a' stands for 'append'
you can use 'w' to clean up your file
(the 'w' stands for 'write')
example:
set out [open textOut.txt w]
puts $out ""
close $out
______________________
RODAN