Print in batch mode

omartin
omartin New Altair Community Member
edited October 2020 in Community Q&A

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

  • omartin
    omartin New Altair Community Member
    edited April 2020

    I just want the black window of Hypermesh batch mode to show what it is doing.

  • tinh
    tinh Altair Community Member
    edited April 2020

    If you want, in your tcl file: create a tk toplevel and a textbox to puts ouput status there

  • Vlad VB
    Vlad VB Altair Community Member
    edited May 2020

    Tinh, 

       Do you have example of toplevel textbox that can output status? Thank you 

  • tinh
    tinh Altair Community Member
    edited May 2020

    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