To capture element quality check display messages

Roshan Shiveshwar
Roshan Shiveshwar Altair Community Member
edited October 2020 in Community Q&A

 

Capture.JPG.fc3e61ef701514856bdfcf69d81f8e56.JPG

 

Hi, 

 

I want to capture messages those are displayed at the bottom left side of the screen when we perform element quality checks. (Pls refer image).

Actually, I am specifically looking for the value inside the red box.

 

Is there any way we can capture that value?

 

Thanks

 

 

 

 

Answers

  • tinh
    tinh Altair Community Member
    edited July 2017

    Hi,

    you can get the message text by 

    set Message [.mainFrame.bottom.message_label cget -text]

    set WorstValue [string range [lindex $Message end] 0 end-1]

     

  • Roshan Shiveshwar
    Roshan Shiveshwar Altair Community Member
    edited August 2017

    Thanks tinh :D/emoticons/default_biggrin.png' srcset='/emoticons/biggrin@2x.png 2x' title=':D' width='20' />. 

     

    BTW , where do we find these commands in altair help documentation?

     

     

  • tinh
    tinh Altair Community Member
    edited August 2017

    No, they are not documented.

    They are pure tcl commands and listed in tcl manual

     

  • Roshan Shiveshwar
    Roshan Shiveshwar Altair Community Member
    edited August 2017

    No, they are not documented.

    They are pure tcl commands and listed in tcl manual

     

    Oh.. good to know.. Will start exploring them as well. :)/emoticons/default_smile.png' srcset='/emoticons/smile@2x.png 2x' title=':)' width='20' />

  • Sagar Motwani_20540
    Sagar Motwani_20540 Altair Community Member
    edited December 2018

    Hi Roshan and Tinh,

     

    The command 'set Message [.mainFrame.bottom.message_label cget -text]' seems to work fine in Hm 14.0.130. But, is throwing error - bad window or invalid command name '.mainFrame.bottom.message_label', for Hypermesh above HM 14.1 and also HM 2017. Can you please suggest any solution to this.

     

    Thanks,

    SAGAR

  • tinh
    tinh Altair Community Member
    edited December 2018

    I don't have hm here so let's check it tomorrow

    There is a command that display the message you can hook, i remember it is in HM_Framework namespace (you try searching it by info procs)

    Don't need to trace message_label widget

  • Jeffersondhv
    Jeffersondhv Altair Community Member
    edited December 2018

    Is there a command that can be used to run these quality checks and get the output directly from the code?

     

    Thanks,

    Jefferson

  • tinh
    tinh Altair Community Member
    edited December 2018

    Is there a command that can be used to run these quality checks and get the output directly from the code?

     

    Thanks,

    Jefferson

    Cannot get %fail directly, you have to calculate it by #fails/total

    Use *elementtest... commands

  • tinh
    tinh Altair Community Member
    edited December 2018

    Hi Roshan and Tinh,

     

    The command 'set Message [.mainFrame.bottom.message_label cget -text]' seems to work fine in Hm 14.0.130. But, is throwing error - bad window or invalid command name '.mainFrame.bottom.message_label', for Hypermesh above HM 14.1 and also HM 2017. Can you please suggest any solution to this.

     

    Thanks,

    SAGAR

     

    If you are usinh hypermesh desktop, it is .mainFrame.bottom.leftfrm.label

     

    In HM, it is referred by variable $::HM_Framework::p_message_label

  • imoto
    imoto
    Altair Employee
    edited December 2018

    Tinh is right, HyperMesh and HyperMesh Desktop are using different frame.

     

    @Jeffersondhv

    If you want to correspond both cases, following example can help you.

     

    if {[file tail [hm_info -appinfo SPECIFIEDPATH hm]] == 'hmopengl.exe'} {
     puts [.mainFrame.bottom.message_icon config -image];
     puts [.mainFrame.bottom.message_label config -text];
    } else {
     puts [.mainFrame.bottom.leftfrm.label config -image];
     puts [.mainFrame.bottom.leftfrm.label config -text];
    }

  • Sagar Motwani_20540
    Sagar Motwani_20540 Altair Community Member
    edited December 2018

    Thanks Tinh and Imoto :)/emoticons/default_smile.png' srcset='/emoticons/smile@2x.png 2x' title=':)' width='20' /> .

     

    This worked fine [.mainFrame.bottom.leftfrm.label  cget -text]. As you told, HyperMesh and HyperMesh Desktop are using different frame.