Engineering Solutions

Utility Menus

Utility Menus

Previous topic Next topic No expanding text in this topic  

Utility Menus

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

The Utility menu allows you to customize the standard interface to include function buttons, radio options, and text that have Engineering Solutions-supplied and user-defined macros associated with them. The menu is located on a tab of the tab area pane(s), and can be shown or hidden from within the View menu.

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

The page number allows you 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, and so on to specify where the arguments should be substituted. The *callmacro() command allows you to call a macro from within another one, which allows you to create groups of standard reusable macros.

When Engineering Solutions 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, Engineering Solutions runs it automatically to define the attributes and contents of the Utility menu.  You may also select and run a macro file after Engineering Solutions 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 or in the directory from which Engineering Solutions launches. When Engineering Solutions 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.

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.

 

See Also:

Default Utility Menu