🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

How to set up a shortcut key for a menu bar command?

Hi!

I already know how to set up a shortcut in Hypermesh and how to mapping a push panel command. Just like set the qualityindex command is 'hm_pushpanel {qualityindex}'.

So my question is how to mapping a menu bar command to a key, such as ' Tools--Model Checker--Abaqus'.

 

Thanks & Regards

 

Find more posts tagged with

Sort by:
1 - 2 of 21
    tinhUser: "tinh"
    Altair Community Member
    Updated by tinh

    Maybe, need a proc like this:

     proc ::hm_callmenu args {    set mnuMain [lindex $args 0]    if {![winfo exists $mnuMain]} {set mnuMain [. cget -menu]} else {set args [lrange $args 1 end]}    set mnuTarget $mnuMain    set mnuItem [lindex $args end]    set args [lrange $args 0 end-1]    for {set i 0} {$i<[llength $args]} {incr i} {       set mnuSub [string tolower [lindex $args $i]]       set mnuSub [string map {' ' _} $mnuSub]       set mnuTarget $mnuTarget.$mnuSub    }    if {[winfo exists $mnuTarget]} {        $mnuTarget invoke $mnuItem    } else {        tk_messageBox -title Hypermesh -message 'Menu not found ' $mnuTarget '' -icon error    } }

     

    now assign to shortcut key to call a menu:

     hm_callmenu Tools {Model Checker} Abaqus

     

    How to setup the 'save' shortcut key in hypermesh software