Utility Menus

The Utility menu contains options that allow you to customize the standard interface to include function buttons, radio options, and text that have HyperMesh-supplied and user-defined macros associated with them.

To open the Utility menu, click View > Browsers > HyperMesh > Utility from the menu bar.

The Utility menu includes several pages of its own, each dedicated to different tasks. Thus it is actually a group of menus, although only one displays at a time. Each page is associated with a button at the bottom of the Utility menu; clicking one of these buttons opens the page associated with it. Only one button can be depressed at a time, similar to the way that only one radio button can be active at a time - selecting a button de-selects all of the other buttons in the group.

A macro file (hm.mac) controls the display and available operations of the Utility menu. Attributes that you can change include:
  • The Utility menu page on which the operations appear
  • Text to be displayed on each control
  • Location and size of the menu
  • The help string to be displayed on the menu bar
  • The macro to call when each control is used, with optional arguments to pass

Use page number to create multiple pages, so that you can group the macros by type of operation.

Macros may contain any valid command file command, and are enclosed by the *beginmacro() and *endmacro() commands. Macros may accept variable arguments, passed to them from a control, by using the arguments $1, $2, etc. to specify where the arguments should be substituted. The *callmacro() command calls a macro from within another one, which allows you to create groups of standard reusable macros.

When HyperMesh starts, it looks for a macro file named hm.mac in the current directory, HOME directory (UNIX only), or the application’s base directory. If it finds this macro, HyperMesh runs it automatically to define the attributes and contents of the Utility menu. You may also select and run a macro file after HyperMesh starts from within the Options panel.

The default hm.mac file sources the following additional macro files:
disppage.mac
Populates the Display page of the Utility menu.
geommeshpage.mac
Populates the Geom/Mesh page of the Utility menu.
globalpage.mac
Creates the button group that allows you to switch pages.
qamodelpage.mac
Populates the QA/Model page of the Utility menu.
userpage.mac
Populates the User page of the Utility menu.

A userpage.mac file may exist in the installation directory for HyperMesh or in the directory from which HyperMesh launches. When HyperMesh starts, it first looks for the userpage.mac file in the directory from which it launches and then in the installation directory. UNIX users also have the option of putting the userpage.mac file in their home directory. This file defines the attributes and contents of the User page of the Utility menu.

By default, the Utility menu displays when HyperMesh starts, but display of the menu is controlled by a command in the HyperMesh Configuration.
Note: While macros offer a great deal of flexibility, you must remember that once a macro is executed, there is no way to cancel the execution or reject the results, and a macro may not be called recursively.