Read hypermesh status updates when Batch Mesher is operational
Is there a way to read what updates are being posted on the Status bar when the batch mesher is run on a particular model ?
For example I can see various status updates such as 'Topology Cleanup : Step 10' and so on, but I want to read those status updates into a variable using a tcl script.
Any help is appreciated. Thank you.
Answers
-
Hi, there is no variable bind to message label, so you need to configure it, example
.mainframe.bottom.message_label configure -textvariable ::your_var_name
0 -
@tinh : This is really useful. However I have one concern, when I configure the message_label to my textvariable, it stops storing the updated messages that should be displayed when the batch mesher is run, instead if I change my variable's value only then is the text in the message_label changed on the hm window.
However, I was able to get the current text in the message_label using,
.mainFrame.bottom.message_label cget -text
Then again, this only gives me the text that is displayed at the time I use this above line, but doesn't keep updating as the text in the label changes.
For example, I want to create a label in my GUI which mirrors the text that is displayed in the message_label always, how could I go about doing that ?
Is there a specific variable that stores the variable in message_label which I can then link my own label's textvariable to ?
Thanks.
0 -
oh, so I think it is set by an internal variable. I will comback later when I find a solution
0 -
Hello @jcd
The only way perhaps is to bind .mainFrame.bottom.message_label with a script that will set your variable with its text value
Think that when message text changed, width of message_label will change, too. It will raise a configure event to which we can bind a script. Example
#binding: bind .mainFrame.bottom.message_label <Configure> {set your_variable [%W cget -text]} #create your mirrored label: toplevel .your_gui wm transient .your_gui . pack [label .your_gui.label1 -textvariable your_variable]
/emoticons/default_wink.png' srcset='/emoticons/wink@2x.png 2x' title=';)' width='20' />
0 -
@tinh : This is brilliant! I did think of binding the message_label text itself whenever it is changed, but wasn't able to find any way to do so. However, I never thought that we could bind it to whenever the width of the message_label is changed. This is exactly what I was looking for.
Thank you !
0