Cavor Symbology language.
Drawing Commands:
color color
Set the drawing color (pen color) for subsequent draws.
font [fontname]
Set the font for subsequent text. The named font must be available.
line [distance [units]]
Draw a line along the entity path (meaningless for non-line features), for distance or to the end of the entity, whichever is shorter. Updates the position variable. Default distance is the entire length. Default units is the database length unit, scaled to the display.
linestyle { solid | dot | dash | dashdot }
Set the style for subsequent line draws.
linewidth width [{ absolute | relative }]
Set the width for subsequent draws to width. If absolute is specified, the width is taken as millimeters on the display, regardless of scale (this is the default). If relative is specified, the width is taken as database length units (e.g. meters) and scaled relative to the display.
offset { left | right } distance
Set the current position to the left or right of the entity path (relative to the path from beginning to end). Meaningless for single-point entities.
skip [distance [units]]
Skip (move) along the entity path. Similar to line (above) but no line is drawn.
symbol 'symbolname' [size size [{ absolute | relative }]] [angle angle [{ absolute | relative }]]
Draw symbol symbolname, scaled to size size (default 1, or, for a two-point feature, the distance between the points), and rotated at angle angle to the baseline. The default (relative) baseline for a one-point feature is the X-axis (horizontal), for a two-point feature is the line between the two points, and for a multi-point line feature it is the current path of the line (at a corner, it is perpendicular to the bisector of the angle). The position variable is unchanged. If symbolname isn't found in the current symbol library and error is returned. Absolute and relative sizes are as for linewidth (above). Absolute angle is relative to the display X-axis.
text 'text string' [size size [{ absolute | relative }] ] [angle angle [{ absolute | relative }] ]
Draw the text string in the current font and color. Size and rotation works the same as for symbol (above). Entity attribute values can be substituted in the text string by using '@attributename' (e.g. '@resistance' or '@street_name').
Control Commands
if ( expression ) { commands1 } [ else { commands2 } ]
If expression evaluates to true or non-zero, perform commands1, otherwise perform commands2 (if present).
while ( expression ) { commands }
Built-in variables
current
Current drawing position. Initial value is start, may be changed by the drawing commands (above).
distance
Distance of current along the path.
end
End position (last point) of the current entity.
length
Length (along the path from start to end) of the current line entity. Zero for other entity types.
start
Start position (first point) of the current entity.
Examples
Simple examples:
You have a point feature (say, a mine entrance) that you want to
represent with a crossed pick and shovel symbol, in red, at a size of
5m (relative to the ground). This assumes that the symbol has already
been defined in the active symbol library.
color red;
symbol 'pickandshovel' size 5;
You have a line feature (say, a connecting line on a diagram) that
you want to represent by a simple black line with an arrowhead at the
end. The arrowhead symbol is digitized pointing 'up' relative to the
baseline, so we'll have to rotate it.
color black;
# if we want an arrowhead at the start, uncomment the following:
# symbol 'arrowhead' angle 270;
line;
symbol 'arrowhead' angle 90;
A more complex example:
You have a line entity representing a buried cable. You'd like it symbolized as a blue line with the letter 'B' periodically inserted (---- B ----- B ----- B ---). At the center you'd like to print the attributes cabletype (a four character code) and cablelength (in feet, the actual length rather than the digitized length), as follows: