#

# LogiView

## Command 'menu_create'

| This command is used to generate (a multi-language) menu from the forwarded variable arrays. The number of menu options depends on the number of assigned elements in the first forwarded variable array. If no variable arrays are forwarded, the menu is (re-)loaded according to the definition in the data dictionary (corresponds to the DataView function Create new). Possibly set options like "/TITLE", "/USX" and "/PAR" are ignoriered.
| ### Syntax:
| menu_create ({STR_EXPR}) or menu_create ({STR_EXPR}, {VAR_LIST})
| ### I/O parameters:
| {STR_EXPR} | Menu name and further options in the format "name /TITLE=tit /USX=usx /PAR=par" with:
Name | Menu name (upper-case).
tit | Menu title (columns separated by "|").
usx | Userexit (equal for every selection).
par | Userexit parameter (equal for every selection).
| {VAR_LIST} | List of variable arrays whose contents is to be entered into the menu. Every variable array is entered into a column. The number of the first array element is to be used as array index (usually "1").
| - |
| ### Return value:
| - |
| ### Example:
| Declaration of Variables
    RAL_NR[1] = 101
    RAL_NR[2] = 102
    RAL_NR[3] = 452

    NAME[1] = "Red"
    NAME[2] = "Olive-green"
    NAME[3] = "Orange"

    60 menu_create("COLOURS /TITLE=RAL-No|Colour",RAL_NR[1],NAME[1])
    70 field_set_menu(widget_id(),"C_241", "COLOURS")
| Result:
| A bi-lingual menu "COLOURS" is generated, consisting of a RAL number and the name of the colour. The generated menu is added as a selection menu to the field "C_241" of the current widget (line 70).
| Functions and commands: Editing Menus