To capture element quality check display messages
Find more posts tagged with
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
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
Tinh is right, HyperMesh and HyperMesh Desktop are using different frame.
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];
}
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]