Technical data

add button
ModelSim EE/SE Command Reference ModelSim Commands CR-21
Note: Because the arguments are positional, a Disable | NoDisable option must be specified in order to use
the options argument.
Examples
add button pwd {transcribe pwd} NoDisable
Creates a button labeled "pwd" that invokes the transcribe command (CR-157) with the
pwd Tcl command, and echoes the command and its results to the Main window. The
button remains active during a run.
The pwd button
example is available in
the following DO file:
<install_dir>/
modeltech/examples/
addbutton.do. You can
run the DO file to add
the pwd button 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.
add button date {transcribe exec date} Disable {-fg blue -bg yellow
-activebackground red}
Creates a button labeled "date" that echoes the system date to the Main window. The button
is disabled during a run; its colors are: blue foreground, yellow background, and red active
background.
add button doit {run 1000 ns; echo did it} Disable {-underline 1}
Creates a "doit" button and underlines the second character of the label, the "o" of "doit".
.controls.button_7 config -command {run 10000} -bg red
Changes the button command to "run 10000" and changes the button background color to
red.
See also
transcribe command
(CR-157), and the "The Button Adder" (10-265) tool