UIC file format
Unit ICon files (*.uic) are flat text files. Comment lines in the files start with '#' and are ignored. All other lines start with an object identifier keyword, each of which is followed by one or more arguments. Arguments are white-space separated (spaces or tabs). Empty lines are ignored. All coordinates are in distances of 1 grid.
Icon dimensions and scalability
The icon files must contain the design width and design height of the icon:
WIDTH design-width HEIGHT design-height
Here, design-width and design-height are integers with a minimum value of 2.
If the icons are scalable, they do so around the scale point. All items on the right or bottom of the scale point will move with the amount of the icon's size extent (the size of the icon minus its design size). Icons exactly on the scale point will move with half this distance. If only a horizontal scale point is present, the icon is only scalable in horizontal direction. If only a vertical scale point is present, the icon is only scalable in vertical direction:
XGROW x YGROW y
Here, x and y are the scale points. These are integer values that must be larger than 0 and smaller than design-width or design-height respectively.
If the icon is scalable, its minimum size is the design size. Its default size however can be larger. To make the default size of the icon larger, use:
DEFWIDTH initial-width DEFHEIGHT initial-height
Here, initial-width and initial-height are integer values, that must be larger than design-width and design-height respectively.
By default, the label of the unit operation is shown centered below the unit operation. You change this by adding the label statement:
LABEL [flags] x y
Here, x and y are the label location (centered, base-line). Optionally you can specify a label rotation flags. Valid flags are ROT90, ROT180 or ROT270.
Visible objects
For a rectangle or oval, or a rectangle with rounded corners, use:
BODY [flags] xfrom yfrom xto yto [roundx] [roundy]
Here, xfrom and yfrom are the top left corner of the object, and xto and yto are the bottom right corner. For the corners to be rounded, you can specify the optional roundx and roundy arguments, which are zero if omitted. A value of -1 denotes that the radius of the arc equals half the size of the body. So -1 for both roundx and roundy will always result an oval, even if the scale point is inside the body. Possible flags are NOLINE, THINLINE, DASHED, NOFILL, SOLIDFILL, BACKFILL.
Regular lines are specified with:
LINE [flags] xfrom yfrom xto yto [amplitude] [wavelength]
Start and end point are denoted by xfrom, yfrom, xto and yto. The line can have a sine shape, with specified amplitude and wavelength, if the WAVE flag is specified. Other optional flags are NOLINE, THINLINE, DASHED, ARROW, RARROW, OARROW, ROARROW.
A poly-line is given by multiple line elements in between PLINE statements:
PLINE START [flags] LINE [flags] xfrom yfrom xto yto ... LINE [flags] xfrom yfrom xto yto PLINE END
Each PLINE START must be closed by a PLINE END, and in between only LINE elements may appear. If start coordinates for a LINE element do not match the end coordinates of the previous line, a LINE element (without flags) will automatically be inserted. Valid flags for the PLINE START element are CLOSED, NOFILL, SOLIDFILL, BACKFILL. In case CLOSED is specified, a line element (without flags) will automatically be inserted if the last line coordinate does not match the first one. If CLOSED is not specified, the fill flags are ignored. Valid line flags are are NOLINE, THINLINE, DASHED, ARROW, RARROW, OARROW, ROARROW.
Hatched regions can be created with the following elements, each creating lines at an interval of 1 grid point:
HLINES flags xfrom yfrom xto yto [amplitude] [wavelength] HLINES flags xfrom yfrom xto yto [amplitude] [wavelength]
The HLINES element creates a horizontal hatch, the VLINES element a vertical. The line can have a sine shape, with specified amplitude and wavelength, if the WAVE flag is specified. Other optional flags are NOLINE, THINLINE, DASHED, ARROW, RARROW, OARROW, ROARROW.
A text element can be inserted using:
TEXT [flags] x y text
The text center coordinates are given by x and y. The text itself is read as a single argument, even if white-spaces are included (do not use quotes). Valid flags are ROT90, ROT180 or ROT270.
Stream routing and connections
Connections can appear only at grid point locations. At least one connection must be specified for an icon file. To specify a single connection, use
CONNECTION x y
Here, x and y are integer numbers ranging from zero to design-width and design-height respectively. A horizontal or vertical strip of connections (that grows if extending around the scale point) can be specified using:
HCONNECTION xfrom xto y VCONNECTION x yfrom yto
Connections cannot overlap, and must be inside the grid design area.
Streams usually cannot plot a route through the grid design area. So for a stream to be able to plot a route to a connection that is not at the boundary of the design area, you must indicate a region through which streams can route:
FREESPACE xfrom yfrom xto yto
Here, xfrom cannot be larger than xto and yfrom cannot be larger than yto. FREESPACE areas should start next to a connection (should not overlap the connection itself), should remain inside the design area, and should not overlap other FREESPACE areas.
Valid flags
The following flags can be used with the above keywords as indicated. Their meaning is explained below:
- NOLINE - do not draw a line element
- THINLINE - draw a hairline
- DASHED - use dashed lines
- NOFILL - do not fill closed objects
- SOLIDFILL - fill objects with the line color
- BACKFILL - fill objects with background color
- CLOSED - closed pline, used with PLINE START
- ARROW - forward arrow on line piece
- RARROW - reverse arrow on line piece
- OARROW - forward open arrow on line piece
- ROARROW - reverse open arrow on line piece
- ROT90 - rotate text 90 degrees clockwise
- ROT180 - rotate text 90 degrees clockwise
- ROT270 - rotate text 90 degrees clockwise
- WAVE - wavy line(s), using amplitude and wavelength