The Siemens Community Catalyst program was co-created with our community to acknowledge technology leaders who consistently contribute to the Siemens Community. Nominations are accepted on a rolling basis.
I am trying to expand the right tab area of hypermesh GUI using code.
Manual step: View >>Tab area>>Right
is there a code that dose the above manual step ??
Hi,
I remember that I answered a similar somewhere, but I can't find the post!
you can invoke the menu:
in Hypermesh:
[. cget -menu].view.tab_area invoke "Right"
But if you use Hypermesh Desktop, menu widgets (and others) seem to be dynamically generated!
so we need to detect them, example proc:
proc callMainPulldown args { set mnuMain [. cget -menu] set mnuName $mnuMain set found [lrepeat [llength $args] 0] set cur 0 foreach inputText $args { set itemCount [$mnuName index end] for {set i 0} {$i <= $itemCount} {incr i} { if {[string equal "separator" [$mnuName type $i]]} continue set mnuText [$mnuName entrycget $i -label] if {[string equal -nocase $inputText $mnuText]} { lset found $cur 1 lset args $cur $mnuText if {[string equal "cascade" [$mnuName type $i]]} { set mnuName [$mnuName entrycget $i -menu] break } } } incr cur } set idx [lsearch -exact $found 0] if {$idx != -1} {return -code error "Error in callMainPulldown: Not found menu item '[lindex $args $idx]'"} $mnuName invoke [lindex $args end] } # usage: callMainPulldown View "Tab Area" Right # you can call other things: callMainPulldown xyplots create curves "single curve"
Hi, I remember that I answered a similar somewhere, but I can't find the post! you can invoke the menu: in Hypermesh: [. cget -menu].view.tab_area invoke "Right" But if you use Hypermesh Desktop, menu widgets (and others) seem to be dynamically generated! so we need to detect them, example proc: proc callMainPulldown args { set mnuMain [. cget -menu] set mnuName $mnuMain set found [lrepeat [llength $args] 0] set cur 0 foreach inputText $args { set itemCount [$mnuName index end] for {set i 0} {$i <= $itemCount} {incr i} { if {[string equal "separator" [$mnuName type $i]]} continue set mnuText [$mnuName entrycget $i -label] if {[string equal -nocase $inputText $mnuText]} { lset found $cur 1 lset args $cur $mnuText if {[string equal "cascade" [$mnuName type $i]]} { set mnuName [$mnuName entrycget $i -menu] break } } } incr cur } set idx [lsearch -exact $found 0] if {$idx != -1} {return -code error "Error in callMainPulldown: Not found menu item '[lindex $args $idx]'"} $mnuName invoke [lindex $args end] } # usage: callMainPulldown View "Tab Area" Right # you can call other things: callMainPulldown xyplots create curves "single curve"
Thanks for the quick help.
Join us for a community conversation on how High-Performance Computing (HPC) and Simcenter PSIM work together to meet the increasing demands of modern power electronics simulation. During this one-hour technical session, you'll discover how leveraging HPC can speed up simulations, improve scalability, and empower engineers…
Join us for a community conversation on accelerating your motor simulation workflow with Simcenter Simlab. In this beginner-friendly session, we'll introduce the platform's automated model-building capabilities and show how easy it is to set up your first electric motor analysis. You'll see the basic steps of geometry…
Join us for a Community Conversation where we'll discuss practical approaches to analyzing complex electromagnetic models using hybrid solver techniques. This session will provide a general overview of how different computational methods can be combined within a single simulation to address models containing varied…