Technical data

Preference variable arrays
226
-
ModelSim EE Graphic Interface ModelSim EE/PLUS Reference Manual
user_hook variables
The user_hook preference variable allows you to specify Tcl procedures to be
called when a new window is created, or when the simulator is used in batch mode.
Multiple procedures may be separated with a space.
For window-specific user_hooks, each procedure added will be called after the
window is created, with a single argument: the full Tk path name of the window
that was just created. For example, if you invoke this command:
lappend PrefSource(user_hook) AddMyMenus
and create a new Source window, the procedure "AddMyMenus" will be called
with argument ".source1" (the new Source window name). See the
view
(p388)
command for information on creating a new window.
The Tcl procedures listed in PrefSource(user_hook) will be executed once the
Source window is open and completely initialized. There is a user_hook setting
for each window type (i.e. Structure, Wave, List, etc.) It's important to note that
the user_hook variable is a list of Tcl procedure names, so it is necessary to use
the
lappend
command instead of the
set
command so that one does not
inadvertently overwrite other extensions.
User_hooks allow you to customize the Model
Sim
interface by adding or
changing menus, menu options and buttons. See the example with the
add_menu
(p264) command for an example of a Tcl procedure that customizes the menus of
a new window.
These variables may be set with the graphic interface or modified from the
command line. See "Setting preference variables with the GUI" (p211) and
"Setting preferences from the ModelSim command line" (p215) for more
information.
The user-hook preference variables and their initial values are as follows:
Variable Initial value
PrefBatch(user_hook) ""
PrefMain(user_hook) ""
PrefStructure(user_hook) ""
PrefSignals(user_hook) ""
PrefVariables(user_hook) ""