OOF2: The Manual

6.2. Menus

At its heart, OOF2 is driven by a set of commands. These commands are arranged hierarchically into menus. A menu is a list of commands, or of submenus, or both. Don't confuse this sense of the word menu with the kind of pull-down menu that appears in a graphical user interface. The menus that appear in the OOF2 graphical user interface are derived from the underlying command menus, but there are commands that don't appear in pull-down menus. However, every action taken in the interface corresponds to a command, and the scripts that OOF2 saves and loads are simply lists of commands. Therefore, to find out how things really work, it's necessary to learn the menu commands. This section contains a reference page for each of the commands, arranged hierarchically.

OOF2 menu commands are Python expressions. OOF is a Python object representing the main menu. OOF.File is one of the submenus in the main menu, and OOF.File.Quit is a command (function) in the OOF.File menu. It can be called by putting parentheses after it: OOF.File.Quit(). If you like, you can drive OOF2 by entering commands directly in the Console window (but it's probably easier to use the GUI).

Most commands take arguments. which are listed in the manual on the reference page for each command. Arguments must be specified as Python keyword arguments, meaning that they are of the form name=value and appear inside the parentheses after the command name, e.g:

                        x_elements=12, y_elements=12,

The order in which the arguments appear does not matter, but each argument value must be the correct type. In this example, name and microstructure are character strings, x_elements and y_elements are integers, and TriSkeleton is an example of an OOF2 RegisteredClass. RegisteredClasses also take arguments, and the same rules apply to them.

OOF Menu Items