Print in batch mode
Hello, I am running a script in batch mode on Hypermesh 2019 and I would like to print everything the program is doing instead of 'Ready' and then close. This is what I have but doesn't seem to print anything:
xxx\altair\v2019\hw\bin\win64\hw.exe -b -p mvw_file -tcl script.tcl
Answers
-
I just want the black window of Hypermesh batch mode to show what it is doing.
0 -
If you want, in your tcl file: create a tk toplevel and a textbox to puts ouput status there
0 -
Tinh,
Do you have example of toplevel textbox that can output status? Thank you
0 -
Hi,
sample like this:
package require Tk
set w [toplevel .output]
wm title $w 'Output status:'
set t [text $w.t]
pack $t -fill both -expand yes
#output everything you need:
$t insert end 'script is running at stage #???'
Another way, easier, you output status to a text file, as almost FE solvers do (nastran outputs to f06, optistruct outputs to .out , dyna outputs to d3hsp...):
set fpt [open output.txt a]
puts $fpt 'script is running at stage #???'
close $fpt
use tail.exe to see the newest message
0