Technical data

add_menu
ModelSim EE/SE Command Reference ModelSim Commands CR-27
global myglobalvar
set cmd1 "echo my_own_thing $wname"
set cmd2 "echo my_to_upper $wname"
set cmd3 "echo my_to_lower $wname"
# WindowName Menu MenuItem label Command
# ---------- ---- -------------------- -------
add_menu $wname mine 0;# 0th letter (M) is underlined
add_menuitem $wname mine "Do My Own Thing..." $cmd1
add_separator $wname mine ;#----------------------------
add_submenu $wname mine changeCase
add_menuitem $wname mine.changeCase "To Upper" $cmd2
add_menuitem $wname mine.changeCase "To Lower" $cmd3
add_submenu $wname mine vars
add_menucb $wname mine.vars "Feature One" -variable
myglobalvar($wname:one)
-onvalue 1 -offvalue 0 -indicatoron 1
}
AddMyMenus .signals
This example is available in the
following DO file: <install_dir>/
modeltech/examples/addmenu.do. You
can run the DO file to add the "Mine"
menu shown in the illustration, or
modify the file for different results.
To execute the DO file, select Macro >
Execute Macro from the Main window
menu bar, or use the do command
(CR-
67)
from the ModelSim command line.
See also
add_menucb command
(CR-28), add_menuitem command (CR-30),
add_separator command
(CR-31), add_submenu command (CR-32), and the
change_menu_cmd command
(CR-44)