How to write error messages in HyperMesh to a file?

Franziska
Franziska Altair Community Member
edited August 28 in Community Q&A

How can I write the error messages in HyperMesh that are written in the bottom left corner to a file? Or are they automatically written to a file?

Tagged:

Answers

  • Bhavik Sheth_21143
    Bhavik Sheth_21143 Altair Community Member
    edited August 27

    Hi Franziska,

    To display an error message in HM, you can use hm_errormessage command.

    For more details, refer link below.

    https://help.altair.com/hwdesktop/hwd/topics/reference/hm/hm_errormessage.htm

     

    Regards,

    Bhavik

  • Franziska
    Franziska Altair Community Member
    edited August 28

    Hi Bhavik, 

    if I use hm_errormessage, I can write my own messages, right? But I want to write the messages, that result by using a command that does not work properly. 


    Here one excample: *edgesmarksuppress 1 30 
    --> You will see a red zero in the Tcl Console and you will see the error message "Lines have not been selected" in the lower left corner. I am trying to write that error message to a file.

    One way I tested is: 

    set log_file [open "logfile.txt" w]

    if {[catch {*edgesmarksuppress 1 30} errorMsg]} {puts $log_file "Error occurred: $errorMsg"}

     

    But that way only writes "Error occurred: 0" to the file.

     

    If I would use HyperMesh in batch mode, then I can write those messages to a logfile. But how can I do this using HyperMesh not in batch mode?