Display a real menu in the AcuDialog window.

## Usage

menuVal = MenuReal( name = None, tooltip = None,
whatsthis = None, helpURL = None,
cond = None, default = None,
unitCat = None, unitsDefault = None,
retUnits = False, settings= None,
dbAccess = None, show = None )

## Parameters

name (string)
Label of the menu. This is displayed on the left.
tooltip (string)
Tooltip help information, also known as bubble. The content of this argument is displayed in a small dynamic box placed opened above the menu, when the cursor remains at the menu for short time. This is typically a short phrase.
whatsthis (string)
Whatsthis help information. When you click on the whatsthis icon followed by clicking on this menu, a small box is opened above the menu and the content of this argument is displayed in it. This is typically a short sentence or two, which provides more information than that given by the tooltip argument. The whatsthis argument is a rich text format, which means you can embed many of the HTML tags, such as <br> for line separator and <b> for bold.
helpURL (string)
This is the HTML-URL address containing detail help on the menu item. When you press the F1 key while the cursor is on top of this menu, the assistance help system opens and displays this page.
cond (string)
The condition that is checked for the entry of this menu.
default (string)
Default value. If the data base or settings does not contain the parameter given by the dbAccess or settings arguments respectively, it is first initialized to this value.
unitCat (string)
The unit category used for this menu. For example, length, time and pressure.
unitsDefault (string)
Default value of the unitCat specified for this menu. For example, if unitCat is length, the unitsDefault can be m, mm, cm, inch, and so on.
retUnits (boolean)
If retUnits = False, the final value is returned as converted to the base units. But if retUnits = True, a tuple with three entries will be returned. This tuple includes the final result converted to the base unit, the entered value and the unit selected.
settings (string)
The setting name which is used for storing the menu value in the settings.
dbAccess (list)
The data base information which is used for storing the menu value in the data base. It is a list that includes data base name, node and unique par (parameter name) used for this menu value.
show (string)
The conditional show statement which will be evaluated to determine if this menu should be shown or not.

## Return Value

A list filled with all the information about this menu including type of the menu, name, tooltip, whatsthis, helpURL, cond, default, unitCat, unitsDefault, retUnits, settings, dbAccess and show.

## Errors

Only one of the dbAccess or settings could be specified and passed to menu function.

The show statement should be a logical correct conditional expression.

The default should be in accordance with menu type.

## Description

This routine places a real menu in the AcuDialog window. The menu contains a label given by the name. The menu information is given by tooltip, whatsthis and helpURL. The entered value for this menu will be checked by the cond argument. If the value does not meet the condition a warning message will be shown to re-enter the value. A unit category could be specified by unitCat and the default unit for this category is given by unitsDefault. If retUnits = False, the final value is returned as converted to the base units. That is, if you say (10 mm) the returned value will be 0.01. Now if retUnits = True, a tuple with three entries will be returned. This tuple includes the final result converted to the base unit, the entered value and the unit selected. In the above example, the returned value is (0.01, 10, mm). The displayed value is extracted from the dbAccess or settings. Upon change, the value is deposited back onto the data base or settings. The show statement is a conditional expression which starts with values word and evaluates any member in the values list. The values is a list that includes all the previous menu's values. For example, if the current menu is the fourth menu in the dialog, the values includes values of the first three menus.

For example,
mnuReal = AcuDialog.MenuReal( name = 'Length ( real )',
default = 6.9,
tooltip = 'real menu witn units',
whatsthis = 'real menu witn units',
helpURL = 'real menu witn units.htm',
cond = 'val>=1.0',
unitCat = 'length',
unitsDefault= 'mm',
retUnits = True,
settings = 'data numbers/len' )

As retUnits is True here, the final value of this menu is:

[0.0069000000000000008, 6.9000000000000004, 'mm']

The first value of this tuple is produced by converting 6.9 from 'mm' (the given unit) to 'm' (the base unit of 'length' unit category).