set the variable from F10 (Quality Check panel)
Hi,
I want set the three variable whenever I use F10 Quality check.
For example,
*elementtestinterangle elements 1 30 1 2 1 4 0 " 3D Tria Face Min Angle "
The above command is to check min angle of 3d face tria,
Inthese I need to get {internalangle,30,3D Tria Face Min Angle} and set to a variable.
Also if,
*elementtestlength elements 1 1.3 2 1 2 0 " 2D Length < "
the above command is executed
I need to get {length,1.3,2D Length <}
Respectively,
Best Answer
-
Hi
Assume that you want:
whenever you press F10 and click "length <" and "min angle <", you want to store some things that describe your actions.
Let's hook to *commands:
::hwt::AddCallback *elementtestinterangle p_RecordCheckActions leave ::hwt::AddCallback *elementtestlength p_RecordCheckActions leave proc ::p_RecordCheckActions args { regsub -all {[\{\(\,\*\)\}]+|elementtest} $args " " tcl_cmd lassign $tcl_cmd param -> -> threshold set type [lindex $tcl_cmd end] puts "set your_variable {$param, $threshold, $type}" list $param $threshold $type }
Tested on HM2019 Classic
1
Answers
-
I'm sorry. I was not so clear to me. Can you elaborate a little bit more the big picture?
What are you trying to accomplish here?
Do you want to do a check in the GUI and have it writting something for you? I didn't get it, sorry.
0 -
Hi
Assume that you want:
whenever you press F10 and click "length <" and "min angle <", you want to store some things that describe your actions.
Let's hook to *commands:
::hwt::AddCallback *elementtestinterangle p_RecordCheckActions leave ::hwt::AddCallback *elementtestlength p_RecordCheckActions leave proc ::p_RecordCheckActions args { regsub -all {[\{\(\,\*\)\}]+|elementtest} $args " " tcl_cmd lassign $tcl_cmd param -> -> threshold set type [lindex $tcl_cmd end] puts "set your_variable {$param, $threshold, $type}" list $param $threshold $type }
Tested on HM2019 Classic
1 -
tinh said:
Hi
Assume that you want:
whenever you press F10 and click "length <" and "min angle <", you want to store some things that describe your actions.
Let's hook to *commands:
::hwt::AddCallback *elementtestinterangle p_RecordCheckActions leave ::hwt::AddCallback *elementtestlength p_RecordCheckActions leave proc ::p_RecordCheckActions args { regsub -all {[\{\(\,\*\)\}]+|elementtest} $args " " tcl_cmd lassign $tcl_cmd param -> -> threshold set type [lindex $tcl_cmd end] puts "set your_variable {$param, $threshold, $type}" list $param $threshold $type }
Tested on HM2019 Classic
Hi Tinh,
This is exactly what I want, Thank you.
0