interface option_menu modify

Allows you to modify an existing option menu.

Format:

 
interface option_menu modify
option_menu_name =
an existing GI_opt_menu
new_option_menu_name =
a new GI_opt_menu
enabled =
boolean
help_text =
string
documentation_text =
string
Iunits =
int_units
horiz_resizing =
int_h_resize
vert_resizing =
int_v_resize
location =
real
height =
real
width =
real
choices =
string
values =
string
commands =
string
current_choice =
string

Example:

 
interface option_menu modify &
option_menu_name =
test &
new_option_menu_name =
new_test &
enabled =
yes &
help_text =
help for info window &
documentation_text =
doc for the command &
units =
relative &
horiz_resizing =
attach_left &
vert_resizing =
attach_top &
location =
0,0 &
height =
1 &
width =
1 &
choices =
one, two, three &
values =
"10,20,30" &
commands =
"model display fit_to_view = no view_name = all","interface dialog &
undisplay dialog=.gui.moag","interface dialog display dialog=.gui.moag" &
current_choice =
two

Description:

 
Parameter
Value Type
Description
option_menu_name
A New GI_opt_menu
Specifies the name of an existing information window
new_option_menu_name
A New GI_opt_menu
Specifies a new name for the existing information window
enabled
Boolean
Activates the information window
help_text
String
Specifies the help text
documentation_text
String
Specifies the documentation text
units
Int_units
Specifies the info window size in pixels or units relative to Adams window
horiz_resizing
Int_h_resize
Specifies the attachment and scaling option for menu
vert_resizing
Int_v_resize
Specifies the attachment and scaling option for menu
location
Real
Specifies the location of the menu
height
Real
Specifies the height of the menu in terms of relative units or pixels
width
Real
Specifies the width of the menu in terms of relative units or pixels
choices
String
Specifies the names of the choices
values
String
Specifies value of each of the choices
commands
String
Specifies the command name to be executed
current_choice
String
Specifies the current command from the choices

Extended Definition:

1. The name of the existing menu can be changed by specifying the parameter new_option_menu_name. This menu has multiple choices offered as various option or commands are to be executed. Each option or choice has an associated command.
2. If the parameter, ‘Enabled’, is set to ON, the menu will be preactivated.
3. The pop-up help and documentation help can be specified in appropriate dialog boxes.
4. The size of the info window can be specified in terms of the number of pixels. Alternatively, the size can also be stated as relative to the Adams window.
5. The vertical and horizontal resizing options are used to adjust the placement of the option menu in the existing dialog box. For example, attach_left; attach_top options for Horiz_resizing and Vert_resizing will place the option menu in the top left corner of the dialog box. The location can also be specified from the top left corner by adjusting the parameter, ‘location’.
6. The size of the option menu window can be specified with respect to the Adams window size. The value for parameter height and width should be a real number between 0.0 and 2.0, where 2.0 represents the height of the Adams View window. Therefore, a value of 1.0 will set the info window to be half as high as the Adams View window.
7. Multiple choices can be specified for a number of commands to be executed. The choice can be offered as any string variable. Similarly, the choices can also be specified as values by specifying the parameter, ‘value’.
8. The number of commands equal to the choices offered are entered within quotation marks, separated by commas.
9. While executing the option menu, the default command to be executed is selected from the parameter, ‘current choice’.

Tips:

If the values of the choices, in item 12 above, are numeric, then it should be quoted as a string.