Code file

The code file includes definitions of point, line and text coding, attribute data and drawing rules. Most of these settings can be edited using code file editing dialogs.

Common

Common settings:

[common]

Version=5

Colors

Color section defines 30 color palette as a RGB-values. The amount of each red, green and blue component is given as an integer value between 0-255. Value 0, 0, 0 is black and 255, 255, 255 is white. The color index 0 is used as a background color.

example:

[color]

0 FFFFFF
255,255,255

1 000000
0,0,0

2 FF0000
0,0,255

3 0000FF
255,0,0

4 008000
0,128,0

5 00FFFF
255,255,0

Fonts

In the font definition, the code and name of the font are given in first line. The second line consists the used font face name and following attributes: , size (mm), color (color table index) and binary flags (bold (1), italic (2), underline (4), strikeout (8), opaque(16)).

example:

[font]

1 Fontti 1
Arial,3.00,1,0

2 Fontti 2
SansSerif,3.00,2,1

3 Fontti 3
Comic Sans MS,3.50,3,3

Symbols

In the symbol definition, the code and name of the symbol are given in first line. In the second line actual drawing commands are given. They define the shape of the symbol in 100x100 grid using following semicolon separated commands:

Ux,y - moves pen to position x,y without drawing, for example U20,10;

Dx,y - draws straight line from previous position to x,y, for example D-30,40

Rb - draws circle with radius b, for example R25

Ab - set text angle to b gons in geographic system, for example A150

Gb - set text angle to b gons in mathematical system, for example G-50

Cn - change text color, n = color index

Jn - sets text alignment with values 1-9, for example J3

Ttext - writes text using given absolute angle direction. for example Tculvert

!text - writes text using given relative angle direction. for example !culvert

%cn - writes fields c (1-6) or coordinate c (XYZ) with n decimals, e.g.%1 or %X3

Ssize - text size in symbols

Note, that if you use the symbol editor for symbol creation, the program does not yet support al its features like arcs or filled elements. Edit the dataline manually to get these changes.

Example:

[symbol]

  106 Circle with horizontal line
      U00,00;R50;U-50,00;D50,00;

  107 Circle with two horizontal lines
      U00,00;R50;U-45,-20;D45,-20;U45,20;D-45,20;

  108 Circle with vertical line
      U00,00;R50;U00,-50;D00,50;

  109 Circle with two vertical lines
      U00,00;R50;U-20,-45;D-20,45;U20,-45;D20,45;

  110 Circle with two diagonal lines
      U00,00;R50;U-46,-18;D18,46;U-18,-46;D46,18;

Codes

The code definitions are given for fields T1 and T3 in their own sections. The T1 definition includes surface based drawing rules for profiles and cross sections. The field T3 definition includes code based drawing rules for normal map pictures and also the allowed attributes and their values.

For fields T2 (line number) and T4 (point number) only field name can be given.

In the first line, code and name are given. It is possible to use ? characters as a wildcard to mean any other character. For example, code definition 3?? defines drawing rules and attributes to all three letter codes with 3 as a first character.

The second line consists point drawing rules used both single point and break line and profile breakpoint drawing. The third line defines line drawing an the fourth area painting.

The following values are given in each line:

symbol - symbol code from the symbol list, for example 106

color - color as a the color table index, for example 4

size - symbol or line sequence size in millimeters, for example 3.0

width - line width in millimeters, for example 0.25

gap - room reserved for single symbol, for example 4.0

options - binary sum of different options used to control line drawing

In addition to the drawing rules, code T3 can containing attribute definitions starting with line ATTR and following the attributes each on their own line. One attribute definition contains code, name and comma separated value list. Like all other codes in the program, the attribute codes are alphanumeric ids, who define the attribute uniquely. The attribute name is given after the code using notation N=name, where N is attribute number and name is actual name. The attribute number is used in some field measurement systems where it is not possible to record alphanumeric information.

The value list consists allowed values using the notation N=name, where N is value index and name is real attribute value. It is also possible to give * as a value. This allows the user to give any value to the attribute or, if * is followed by <lower limit<upper limit<, to give value between given lower and upper limits. At the end of the attribute definition row the default value can be given using notation @N, which defines value index N as a default.

Example:

[t1] Surface

    1 Earth
      0,4,1.50,0.30,1.50,528
      1,4,0.00,0.50,0.00,528
      5,4,1.00,0.00,1.00,528
      0

    2 Rock
      0,3,1.50,0.20,1.50,528
      1,3,0.00,0.50,0.00,528
      5,3,1.00,0.20,1.00,528
      0

[t2] Line

[t3] Code

  439 Waterpipe
      999,19,-1.00,0.00,-1.00,8256
      1,19,0.00,0.30,0.00,8256,DIA,1.000
      1,19,0.00,0.00,0.00,8256
      0
      ATTR
      DIA,Diameter,*<0.0<9.0<
      WID,Width,*<0.0<9.0<
      HGT,Height,*<0.0<9.0<
      PRO,Protection area,*<0.0<10.0<

  440 Heat pipe well
      100,9,-1.00,0.20,-1.00,0
      1,9,0.00,0.00,0.00,64
      1,9,0.00,0.00,0.00,0
      0
      ATTR
      DIA,Diameter,*<0.0<9.0<
      DEP,Depth,*<0.0<9.0<

  449 Heat pipe
      0,9,0.00,0.00,0.00,8192
      1,9,0.00,0.20,0.00,8192,WID,1.000
      1,9,0.00,0.00,0.00,8192
      0
      ATTR
      DIA,Diameter,*<0.0<9.0<
      WID,Width,*<0.0<9.0<
      HGT,Height,*<0.0<9.0<
      PRO,Protection area,*<0.0<10.0<

[t4] Number

[t5] Accuracy

    1 RSK 0.25 m
      0,1,0.00,0.00,0.00,0
      1,1,0.00,0.00,0.00,0
      1,1,0.00,0.00,0.00,0
      0

    2 RSK 0.5 m
      0,2,0.00,0.00,0.00,0
      1,2,0.00,0.00,0.00,0
      1,2,0.00,0.00,0.00,0
      0

[t6] Method

   60 Straight line
      0,1,0.00,0.00,0.00,0
      1,1,0.00,0.00,0.00,0
      1,0,0.00,0.00,0.00,0
      0

   61 Spline
      0,1,0.00,0.00,0.00,0
      1,1,0.00,0.00,0.00,0
      1,0,0.00,0.00,0.00,0
      0

Macro for T3-codefield

If code name starts with #, it is a macro. All attributes from this macro can be copied to other codes in the code list. If code is #DEFAULT, every codes in the code list will get the same attributes as this code. If code is something else (e.g. #MAT), can the attributes from this code be copied to some other codes by defining this code in attribute section.

In the following example the test code TEST1 will get attributes DATE and USER. Test code TEST will get also attribute MAT.

[t3]

#DEFAULT  Common attributes (macro)
      ATTR
      DATE,1=Date
      USER,2=User,1=Danny,2=Peter

 #MAT Material (macro)
      ATTR
      MAT,1=Material,1=Steel,2=Concrete,3=Platics

 TEST1 Testcode1
      191,13,-0.50,0.20,0
      0,13,0.00,0.00,32
      0,13,0.00,0.00,0
      0,-0.50,0.00,0.00
      0

 TEST2 Testcode2
      191,13,-0.50,0.20,0
      0,13,0.00,0.00,32
      0,13,0.00,0.00,0
      0,-0.50,0.00,0.00
      0
      ATTR
      #MAT