DATT (Define an attribute table entry)
This command creates a new attribute table entry and defines the attributes of that entry. If the entry exists, the attributes are re-defined.
Command Syntax:
DATT name=colours,lst,lpc,tht,twd,tsp,tsl,font
Command Parameters:
name=colours
|
Up to a 15 character attribute name.
Note that attribute names are case-sensitive.
|
Line and fill colour settings, and line thickness. Colours are defined by specifying one or more colour letters, each followed by an optional colour intensity between 0 and 255. Line colours are specified in lower-case characters, while upper-case characters define the fill. The letters are:
|
k,K
|
blacK
|
c,C
|
Cyan
|
m,M
|
Magenta
|
y,Y
|
Yellow
|
r,R
|
Red (magenta and yellow)
|
g,G
|
Green (cyan and yellow)
|
b,B
|
Blue (cyan and magenta)
|
t
|
line thickness in microns (default 1)
|
Note that lower-case letters (kcmyrgb) set the line colour. Upper-case letters (KCMYRGB) set the fill colour.
If a colour intensity is omitted, an intensity of 255 (full intensity) is used. The default line and fill colours are black and white respectively. For example, both k64b and k64cmM are dark blue lines (cyan and magenta are equivalent to blue) and the fill colour is set to full intensity magenta.
|
lst
|
Line style
|
1
|
solid (Default)
|
2
|
long dashes
|
3
|
dotted
|
4
|
short dashes
|
5
|
long/short/long dashes
|
6
|
long/dot/long dash
|
|
If the style is negative, then a smooth joining line is used. The default is a solid style, with a straight joining line (+1).
|
lpt
|
Line pitch. The default is 0.5 cm.
|
tht,twt,tsp
|
Text height, width and spacing in map units. The defaults are 0.3cm.
|
tsl
|
Text slant in degrees. The default is 0° slant.
|
font
|
Text font name. The default font is DEFAULT.
|
Example
For example, the following defines an attribute entry named house, which will use a 500 micron black solid line and yellow colour fill:
DATT house=kYt500
To use an attribute, specify the name of the attribute in the graphics command. For example, to draw a rectangle using attribute house, the command would be:
RECT 0,10,5,15,10,house
If the named attribute does not exist, it is created with default settings. You also have the option to set the line and fill colours, and the line thickness attributes by following the attribute name by an "=" sign and a colour setting string. The following is equivalent to both the DATT and RECT commands of the previous example:
RECT 0,10,5,15,10,house=kYt500
This will create an attribute named house if it does not exist, and set the attributes as defined. If house did exist, its attribute settings would have been changed.
You may wish to plot a house with a red outline, but still have it associated with the house attribute. Using a " : " rather than the " = " will cause an attribute override to be specified with the entity in the plot file:
RECT 0,10,5,15,10,house:rYt500
This command is part of the MAPPLOT GX.