The neutral graphics file is an 80-byte, ASCII coded file with fixed length records. It contains plot directives representing the image of a display, as formed in ANSYS, encoded onto a host-independent, printable character set.
Most ANSYS users will not need to know the format of the graphics file. However, in rare cases, you may want to edit your graphics file or, as a programmer, you may need to know the file format to write a program that reads it. Although the file is ASCII coded, it can be difficult to interpret. This section gives details about the file format.
The host-independent printable character set consists of the ASCII characters listed below:
Numerals 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9
Uppercase alphabetic characters A through Z
The following characters: $ ( ) * + , - . < = >
The space character, " ".
Graphics files contain a set of directives that define various aspects of how ANSYS displays a plot, such as window coordinates, colors for graphs and test, line dimensions, and so on. Each directive consists of a command character followed by one or more parameters.
Within a graphics file, one directive directly follows the preceding directive. For example, below is the first line of a graphics file:
(BBAAA2A0AAAAAAPPPLPO>AP$MEKLKBAJANSYS 5.3$MEKLEFALNOV 15 1996$MEKKOJAI10:01:40
The text of this example line breaks down as follows:
(BBAAA | The Start-Plot directive, beginning with command character. (B, B, A, A, and A are the values of parameters defining the plot environment. (Parameters for all plot directives, and their possible values, are explained later.) |
2A | The Text-Size directive, which determines the type size of displayed text strings. The 2 is the command character, and A represents the size value. |
0AAAAAAPPPLPO | The Window directive, which sets the coordinates for the displayed image. 0 is the command character. AAAAAA represents the first set of coordinates (the lower left corner of the image), and PPPLPO represents the second coordinate set (the right upper corner of the image). |
>AP | The Text-Color directive, which sets the color of displayed text. > is the command character. AP is a parameter value specifying the color. |
$MEKLKBAJANSYS 5.3 | The first of several Text directives. $ is the command character, MEKLKB are the coordinates for the text, AJ is the number of characters in the string, and ANSYS 5.3 is the text string itself. |
$MEKLEFALNOV 15 1996 | A second Text directive, defining the position and length of the string NOV 15 1996. |
$MEKKOJAI10:01:40 | A third Text directive, defining the position and length of the string 10:01:40 |
The descriptions of graphics file directives in the next section include discussions of the parameter or parameters for each directive. There are five types of parameters:
| Parameter Type | Parameter Attributes | Valid Parameter Values |
|---|---|---|
| Int | 1 byte, base 16 (letters A through P) | 0 through 15 |
| Long | 2 bytes, base 16 (letters A through P) | 0 through 255 |
| Byt3 | 3 bytes, base 16 (letters A through P) | 0 through 65535 |
| Xy | 6 bytes, base 16 (letters A through P) | 0 through 4095, mapped to coordinate space of -1.0 to 1.67 |
| String | An array of Nchar characters | Characters from the common character set. |
The next few pages describe each of the graphics file directives. Parameters are always specified in the order shown below.
Below is the list of color specifications used by the directives that set colors for areas, graphs, and text. If more than a single intensity of a color is available, use the value specified by the Normal directive to complete the selection. Normal of 0 represents the lowest intensity and normal of 255 represents the highest intensity.
| Value | Color |
|---|---|
| 0 | Black |
| 1 | Cyan |
| 2 | Blue-Magenta |
| 3 | Red |
| 4 | Cyan-Blue |
| 5 | Magenta-Red |
| 6 | Green |
| 7 | Orange |
| 8 | Magenta |
| 9 | Yellow-Green |
| 10 | Blue |
| 11 | Green-Cyan |
| 12 | Yellow |
| 13 | Dark Gray |
| 14 | Light Gray |
| 15 | White |
| 16 | |
| : | Reserved for future use |
| 127 | |
| 128 | Blue |
| : | : |
| Cyan | |
| : | |
| Green | |
| : | |
| Indices 128 through 255 represent the color spectrum used to display the Low (Blue) to High (Red) contour values. | |
| : | |
| Yellow | |
| : | |
| Orange | |
| : | : |
| 255 | Red |