Animation Script Reference
The animation script language provides a simple syntax for describing an animation flow. An animation script comprises a single list of a flow’s requests encoded in the form of statements. Statements are terminated by semi-colons, and may be padded with space or tab characters, split across file lines, combined with other statements on a single line, or surrounded by blank lines. However, it is conventional in scripts to place each statement on its own line, aligned to the left-most character of the line.
The format of each statement is the same, and includes the following information:
- simulation time when the request was issued
- execution ID of simulation event that was executing when the request was issued
- request name keyword
- list of request arguments, separated by spaces or tabs
A typical request statement is displayed below. Note that the time, event, and request argument fields are not explicitly labeled within the statement itself; thus the formats of the statement and its associated request are usually needed to decipher the data contents of a statement.
Figure 32: Example Animation Script Statement

Each request supported by the animation script language is documented by its own entry later in this section. A request entry presents the syntax format of the request, including the request’s name and argument list, but not the simulation time, event ID, or terminator fields of a request statement. An entry also provides a description of each request argument. An example entry appears on the next page.
Detailed information on the functionality and purpose of animation script requests is not provided in their entries. For these details, see Chapter 2 “Animation Package” on page 1. Functionality information is provided for animation script requests that do not have an exact Kernel Procedure equivalent.
Figure 33: Example Animation Request Entry

In general, for every animation script request type, there is an equivalent Anim package Kernel Procedure (labeled in request entries as the KP analog). However, there are some special cases in which there is not an exact equivalency, such as:
AnimKPs that just provide a local service to simulation processes or procedures without issuing any requests (this case includesop_anim_ime_gen_pos(),op_anim_lprobe_anvid(), andop_anim_macro_close()).AnimKPs that implement a graphical operation by issuing multiple separate requests (this case includesop_anim_ime_nmod_draw(), which issues the ime_nmod_load and ime_mod_draw requests to load and draw a model).AnimKPs with a variable number of arguments that issue an initial request followed by a series of argument-setting requests and a termination request (this case includesop_anim_igp_macro_draw(),op_anim_igp_macro_redraw(), andop_anim_ime_nobj_update(), which respectively issue the initial requests igp_macro_draw, igp_macro_redraw, and ime_nobj_update; the initial requests are followed by a series of arg_int, arg_dbl, or arg_str requests that set integer, double, or string arguments, and then by the arg_eol list termination request).- Anim KPs that issue a different request depending on the type of data passed to their arguments (this case include
op_anim_mgp_reg_set(), which issues the mgp_reg_set_int, mgp_reg_set_dbl, and mgp_reg_set_str requests).
The arguments of animation script requests are all literal constants encoded in ASCII (i.e., there are no variable or macro capabilities in the script language). Argument data types are defined for distinct categories of information, as documented in the table below. Note that these data types are similar in many instances to the corresponding C data types used to declare the arguments of Anim package KPs; however, the script language supports specialized data types and associated assignment syntax to make specification of arguments convenient.
Table 19: Animation Request Argument Data Types
| Data Type | Example Value | Description | Internal C Storage Class |
|---|---|---|---|
| integer | 5 | general integer value | int or short |
| double | 6.73 | general floating-point value | double |
| string | word "several words" |
general text value; spaces can be included if string is surrounded by double-quotes | char [] |
| Anvid | 44 | viewer ID (integer) | int |
| Anmid | 32 | macro ID (integer) | int |
| Andid | 12 | drawing ID (integer) | int |
| keyword | xor_reset | single-word value, from an enumerated set of words | char or short |
| keyword list | { retain_on, setup_on } |
brace-enclosed, comma-separated list of keywords | char or short |
Keywords are defined for many predefined enumerated values, such as request options. These keywords are concise because they rely on the animation-specific nature of scripts, in contrast to the much more verbose Anim package symbolic constants used in simulation processes and procedures. Most of the enumerated keyword values are listed in the argument description section of request entries.
The common request argument <props> (graphical properties) has many enumerated values, and these keywords are listed only on the next page. <props> arguments are declared as keyword lists, and they accept a brace-enclosed list of graphical property keywords. Graphical property keywords are categorized into property classes. In general, graphical properties from different classes are independent and can be combined, but graphical properties from the same class will produce unexpected results if combined.
Table 20: Accepted Keywords for <props> Argument
| Property Class | Keywords | |||
|---|---|---|---|---|
| horizontal alignment | alignh_center | alignh_left | alignh_right | |
| vertical alignment | alignv_bottom | alignv_center | alignv_top | |
| color names / RGB (the keyword prefix <p> can be either color for foreground color or bgcolor for background color) |
<p>_rgb000<p>_rgb010<p>_rgb020<p>_rgb030<p>_rgb100<p>_rgb110<p>_rgb120<p>_rgb130<p>_rgb200<p>_rgb210<p>_rgb220<p>_rgb230<p>_rgb300<p>_rgb310<p>_rgb320<p>_rgb330 |
<p>_rgb001<p>_rgb011<p>_rgb021<p>_rgb031<p>_rgb101<p>_rgb111<p>_rgb121<p>_rgb131<p>_rgb201<p>_rgb211<p>_rgb221<p>_rgb231<p>_rgb301<p>_rgb311<p>_rgb321<p>_rgb331 |
<p>_rgb002<p>_rgb012<p>_rgb022<p>_rgb032<p>_rgb102<p>_rgb112<p>_rgb122<p>_rgb132<p>_rgb202<p>_rgb212<p>_rgb222<p>_rgb232<p>_rgb302<p>_rgb312<p>_rgb322<p>_rgb332 |
<p>_rgb003<p>_rgb013<p>_rgb023<p>_rgb033<p>_rgb103<p>_rgb113<p>_rgb123<p>_rgb133<p>_rgb203<p>_rgb213<p>_rgb223<p>_rgb233<p>_rgb303<p>_rgb313<p>_rgb323<p>_rgb333 |
| color names / standard (the keyword prefix <p> can be either color for foreground color or bgcolor for background color) |
<p>_beige<p>_brown<p>_green<p>_orange<p>_plum<p>_sienna<p>_white |
<p>_black<p>_corn<p>_magenta<p>_orchid<p>_purple<p>_steel<p>_yellow |
<p>_blue<p>_cyan<p>_maroon<p>_peach<p>_red<p>_tan |
<p>_brick<p>_fuchsia<p>_olive<p>_pink<p>_tan<p>_violet |
| text fonts | font_open_10 font_open_18 |
font_open_12 font_open_24 |
font_open_14 | |
| pixel operators | pixop_and pixop_ndst pixop_nsrc pixop_osrc |
pixop_dst pixop_nodst pixop_odst pixop_osrc |
pixop_eqv pixop_nor pixop_one pixop_xor |
pixop_nand pixop_nosrc pixop_or pixop_zero |
| macro setup flag | setup_off | setup_on | ||
| drawing styles | style_dashes | style_dots | style_pattern | style_solid |
| drawing retention flag | retain_off | retain_on |
An example <props> value is shown below; it sets the graphical properties of text drawn by an igp_text_draw request to be 18 point, green, and with alignment based on the top edge:
Figure 34: Example Text Graphical Property Value

One other common request argument is declared as a keyword list: the <arg_vals> argument of mgp and mme macro-based requests. This type of argument expects a fixed-size list of keywords that represent the source of values for the other requests arguments. A value source may be: (a) a specified macro drawing register (identified by a keyword of the form “reg_<C>”, where <C> is a single character); (b) a literal value specified later in the request statement (identified by the keyword “constant”). Thus the <arg_vals> argument configures a particular format for the mgp and mme requests, by specifying the number of additional arguments to be expected after <arg_vals>. The size of the <arg_vals> list is determined by the number of arguments supported by a request; this number appears in the request entry declarations of <arg_vals>. An example value for <arg_vals> appears below.
Figure 35: Example of Value Source Specification in Macro Request

The mechanism for specifying attribute sources via <arg_vals> presents a complication for optional arguments that are only present when another argument includes a particular value. This situation is limited to the optional <pat_name> argument of the mgp_bg_fill, mgp_circle_fill, and mgp_rect_fill requests, which normally should only be included if the <props> argument includes the style_pattern property keyword. The following special considerations affect these requests:
- the number of items in the
<arg_vals>list is always the same (i.e., a keyword in this list applies to the<pat_name>argument, whether or not<pat_name>is assigned a value from the request statement) - if the
<props>argument is specified by a literal value in the request statement, and it includes the style_pattern property keyword, and the<arg_vals>argument specifies that the<pat_name>argument expects a literal value, then<pat_name>should appear in the request statement - if the
<props>argument is specified by a reference to a macro drawing register, and the<arg_vals>argument specifies that the<pat_name>argument expects a literal value, then<pat_name>should appear in the request statement - excluding the above cases,
<pat_name>should not appear in the request statement