getting message bar text in HW 2020x was ".mainFrame.bottom.message_label cget -text" in 2019.
Peter Randle
Altair Community Member
Hi All
I am trying to grab text from the message bar.
E.G.
".mainFrame.bottom.message_label cget -text" Does not work in 2020x is there another way?
I am trying to get
to understand that the correct units have been used.
set ttname "SHELLSECTION"
set scal 1000.0
*createmark elements 1 "by config" tetra10
*createmark elements 2
*elementtestlength elements 1 20 2 0 4 0 " 3D Length >"
if {[catch {set mm [split [.mainFrame.bottom.message_label cget -text] { }] ]} {set mm [split [.mainFrame.bottom.leftfrm.label cget -text] { }]}
set mmm [lindex $mm 9]
set mmm [string range $mmm 0 end-1]
puts "max length = $mmm"
set scal 1000.0
*createmark elements 1 "by config" tetra10
*createmark elements 2
*elementtestlength elements 1 20 2 0 4 0 " 3D Length >"
if {[catch {set mm [split [.mainFrame.bottom.message_label cget -text] { }] ]} {set mm [split [.mainFrame.bottom.leftfrm.label cget -text] { }]}
set mmm [lindex $mm 9]
set mmm [string range $mmm 0 end-1]
puts "max length = $mmm"
0
Answers
-
If you use hm_getelemcheckbounds 1 2 maxlength it will return the desired value as the second value.
0