OCAD 12 File Format: Difference between revisions

From OCAD 12 Wiki - English
Jump to navigation Jump to search
 
(92 intermediate revisions by 5 users not shown)
Line 1: Line 1:
Version: 2012-02-09
== General==
== General==
This is a description of the file format of OCAD 11 files.
This is a description of the file format of OCAD 12 files.


Be aware that this is an internal format and may change in future versions.
Be aware that this is an internal format and may change in future versions.


=== Data types used ===
=== Data types used ===
OCAD is written in 32-bit Delphi and this description uses the names for the data types as they appear in Delphi. However the same data types are available in other development systems like C++.
OCAD is written in 64-bit Delphi and this description uses the names for the data types as they appear in Delphi. However the same data types are available in other development systems like C++.


{| class="wikitable"
{| class="wikitable"
|-
|-
| Integer|| 32-bit signed integer
| Integer|| 32-bit signed integer
|-
| Cardinal|| 32-bit unsigned integer
|-
|-
| SmallInt || 16-bit signed integer
| SmallInt || 16-bit signed integer
Line 50: Line 50:


<PRE>
<PRE>
TFileHeader = record         // size = 48 Byte  
TFileHeader = record             // size = 60 Byte  
   OCADMark: SmallInt;       // 3245 (hex 0cad)
   OCADMark: SmallInt;             // 3245 (hex 0cad)
   FileType: Byte;           // file type (0: normal map, 1: course setting project, 8: file is saved in Server)  
   FileType: Byte;                 // file type (0: normal map, 1: course setting project, 8: file is saved in Server)  
   FileStatus: Byte;         // not used
   FileStatus: Byte;               // not used
   Version: SmallInt;         // 11
   Version: SmallInt;             // 12
   Subversion: Byte;         // number of subversion (0 for 11.0, 1 for 11.1 etc.)
   Subversion: Byte;               // number of subversion (0 for 12.0, 1 for 12.1 etc.)
   SubSubversion: Byte;       // number of subsubversion (0 for 11.0.0, 1 for 11.0.1)  
   SubSubversion: Byte;           // number of subsubversion (0 for 12.0.0, 1 for 12.0.1)  
   FirstSymbolIndexBlk: integer;   // file position of the first symbol index block
   FirstSymbolIndexBlk: Cardinal; // file position of the first symbol index block
   ObjectIndexBlock: integer;     // file position of the object index block -> TObjectIndexBlock    // max 65536 * 256 objects  
   ObjectIndexBlock: Cardinal;     // file position of the object index block -> TObjectIndexBlock    // max 65536 * 256 objects  
   OfflineSyncSerial: integer;    // serialNumber for offline work in Server mode
   OfflineSyncSerial: integer;    // serialNumber for offline work in Server mode
   Res1: integer;             // not used
   CurrentFileVersion: integer;   // file version for OCAD version
   Res2: longint;         // not used
   Internal: Cardinal;             //  
   Res3: longint;       // not used
   Internal: Cardinal;             //
   FirstStringIndexBlk: longint;   // file position of the first string index block
   FirstStringIndexBlk: Cardinal; // file position of the first string index block
   FileNamePos: integer;     // file position of the file name, used for temporary files only
   FileNamePos: Cardinal;         // file position of the file name, used for temporary files only
   FileNameSize: integer;     // size of the file name, used for temporary files only
   FileNameSize: Cardinal;         // size of the file name, used for temporary files only
   Res4: integer;   // not used
   Internal: Cardinal;            //
  Res1: Cardinal;                // not used
  Res2: Cardinal;                 // not used
  MrStartBlockPosition: Cardinal; // file position of mulitple represention index block
</PRE>
</PRE>


Line 72: Line 75:
Each Symbol Index Block contains the position of the next Symbol Index Block and the file position of 256 symbols.
Each Symbol Index Block contains the position of the next Symbol Index Block and the file position of 256 symbols.
<PRE>
<PRE>
TSymbolIndexBlock= record   // Size: 1028 Bytes
TSymbolIndexBlock= record       // Size: 1028 Bytes
   NextSymbolIndexBlock: integer;
   NextSymbolIndexBlock: integer;
   SymbolPosition: array[0..255] of integer;
   SymbolPosition: array[0..255] of integer;
Line 82: Line 85:
<PRE>
<PRE>
TBaseSym = packed record
TBaseSym = packed record
   Size: integer;             // Size of the symbol in bytes. This  depends on the type. Coordinates following the symbol are included.
   Size: integer;               // Size of the symbol in bytes. This  depends on the type. Coordinates following the symbol are included.
   SymNum: integer;           // Symbol number. This is 1000 times the symbol number.  
   SymNum: integer;             // Symbol number. This is 1000 times the symbol number.  
                            // for example:
                                // for example:
                            //  203.145 is stored as 203145
                                //  203.145 is stored as 203145
   Otp: byte;                 // Object type
   Otp: byte;                   // Object type
                            //  1: Point symbol
                                //  1: Point symbol
                            //  2: Line symbol or Line text symbol
                                //  2: Line symbol or Line text symbol
                            //  3: Area symbol
                                //  3: Area symbol
                            //  4: Text symbol
                                //  4: Text symbol
                            //  6: Line text symbol
                                //  6: Line text symbol
                            //  7: Rectangle symbol
                                //  7: Rectangle symbol
   Flags: byte;               // 1: rotatable symbol (not oriented to north)
   Flags: byte;                 // 1: rotatable symbol (not oriented to north)
                            // 4: belongs to favorites
                                // 4: belongs to favorites
   Selected: boolean;         // Symbol is selected in the symbol box
   Selected: boolean;           // Symbol is selected in the symbol box
   Status: byte;             // Status of the symbol
   Status: byte;                 // Status of the symbol
                            //  0: Normal
                                //  0: Normal
                            //  1: Protected
                                //  1: Protected
                            //  2: Hidden
                                //  2: Hidden
                            // AND 16: selected
                                // AND 16: selected
   PreferredDrawingTool: byte;// Preferred drawing tool
   PreferredDrawingTool: byte;   // Preferred drawing tool
                            //  0: off
                                //  0: off
                            //  1: Curve mode
                                //  1: Curve mode
                            //  2: Ellipse mode
                                //  2: Ellipse mode
                            //  3: Circle mode
                                //  3: Circle mode
                            //  4: Rectangular line mode
                                //  4: Rectangular line mode
                            //  5: Rectangular area mode
                                //  5: Rectangular area mode
                            //  6: Straight line mode
                                //  6: Straight line mode
                            //  7: Freehand mode
                                //  7: Freehand mode
                            //  8: Numeric mode
                                //  8: Numeric mode
                            //  9: Stairway mode                           
                                //  9: Stairway mode                           
   CsMode: byte;             // Course setting mode
   CsMode: byte;                 // Course setting mode
                            //  0: not used for course setting
                                //  0: not used for course setting
                            //  1: course symbol
                                //  1: course symbol
                            //  2: control description symbol
                                //  2: control description symbol
   CsObjType: byte;           // Course setting object type
   CsObjType: byte;             // Course setting object type
                            //  0: Start symbol (Point symbol)
                                //  0: Start symbol (Point symbol)
                            //  1: Control symbol (Point symbol)
                                //  1: Control symbol (Point symbol)
                            //  2: Finish symbol (Point symbol)
                                //  2: Finish symbol (Point symbol)
                            //  3: Marked route (Line symbol)
                                //  3: Marked route (Line symbol)
                            //  4: Control description symbol (Point symbol)
                                //  4: Control description symbol (Point symbol)
                            //  5: Course title (Text symbol)
                                //  5: Course title (Text symbol)
                            //  6: Start number (Text symbol)
                                //  6: Start number (Text symbol)
                            //  7: Relay variant (Text symbol)
                                //  7: Relay variant (Text symbol)
                            //  8: Text block for control description (Text symbol)
                                //  8: Text block for control description (Text symbol)
   CsCdFlags: byte;           // Course setting control description flags
   CsCdFlags: byte;             // Course setting control description flags
                            //  a combination of the flags
                                //  a combination of the flags
                            //  64: available in column B
                                //  64: available in column B
                            //  32: available in column C
                                //  32: available in column C
                            //  16: available in column D
                                //  16: available in column D
                            //  8: available in column E
                                //  8: available in column E
                            //  4: available in column F
                                //  4: available in column F
                            //  2: available in column G
                                //  2: available in column G
                            //  1: available in column H
                                //  1: available in column H
   Extent: integer;           // Extent how much the rendered symbols can reach outside the coordinates of an object with
   Extent: integer;             // Extent how much the rendered symbols can reach outside the coordinates of an object with
                            // this symbol. For a point object it tells how far away from the coordinates of the object
                                // this symbol. For a point object it tells how far away from the coordinates of the object
                            // anything of the point symbol can appear
                                // anything of the point symbol can appear
   FilePos: integer;         // Used internally. Value in the file is not defined.
   FilePos: cardinal;           // Used internally. Value in the file is not defined.
   notUsed1: Byte;             
   notUsed1: Byte;             
   notUsed2: Byte;             
   notUsed2: Byte;             
   nColors: SmallInt;         // Number of colors of the symbol max. 14, -1: the number of colors is > 14
   nColors: SmallInt;           // Number of colors of the symbol max. 14, -1: the number of colors is > 14
   Colors: array[0..13] of SmallInt; // Colors of the symbol
   Colors: array[0..13] of SmallInt; // Colors of the symbol
   Description: array[0..63] of char;// Description text                         
   Description: array[0..63] of char;// Description text                         
Line 153: Line 156:
<PRE>
<PRE>
TPointSym = packed record
TPointSym = packed record
  Size: integer;                        // see TBaseSym
  SymNum: integer;                      // see TBaseSym
  Otp: byte;                            // 1
  Flags: byte;                          // see TBaseSym
  Selected: boolean;                    // see TBaseSym
  Status: byte;                          // see TBaseSym
  PreferredDrawingTool: byte;            // see TBaseSym
  CsMode: byte;                          // see TBaseSym
  CsObjType: byte;                      // see TBaseSym
  CsCDFlags: byte;                      // see TBaseSym
  Extent: integer;                      // see TBaseSym
  FilePos: cardinal;                    // see TBaseSym
  notUsed1: Byte;           
  notUsed2: Byte;           
  nColors: SmallInt;                    // see TBaseSym
  Colors: array[0..13] of SmallInt;      // see TBaseSym
  Description: array[0..63] of char;    // see TBaseSym
  IconBits: array[0..483] of byte;      // see TBaseSym
  SymbolTreeGroup: Array[0..63] of Word; // see TBaseSym
  DataSize: word;                        // number of coordinates (each 8 bytes) which follow this structure, each object header
                                        // counts as 2 Coordinates (16 bytes)
  Reserved: SmallInt;
end;
end;
</PRE>
</PRE>
Line 161: Line 186:
<PRE>
<PRE>
TSymElt = record
TSymElt = record
   stType: SmallInt;         // type of the symbol element
   stType: SmallInt;                   // type of the symbol element
                            //  1: line
                                      //  1: line
                            //  2: area
                                      //  2: area
                            //  3: circle
                                      //  3: circle
                            //  4: dot (filled circle)
                                      //  4: dot (filled circle)
   stFlags: word;             // Flags
   stFlags: word;                     // Flags
                            //  1: line with round ends
                                      //  1: line with round ends
   stColor: SmallInt;         // color of the object. This is the number which appears in
   stColor: SmallInt;                 // color of the object. This is the number which appears in
                            // the colors dialog box
                                      // the colors dialog box
   stLineWidth: SmallInt;     // line width for lines and circles unit 0.01 mm
   stLineWidth: SmallInt;             // line width for lines and circles unit 0.01 mm
   stDiameter: SmallInt;     // Diameter for circles and dots. The line width is included
   stDiameter: SmallInt;               // Diameter for circles and dots. The line width is included
                            // one time in this dimension for circles.
                                      // one time in this dimension for circles.
   stnPoly: SmallInt;         // number of coordinates
   stnPoly: SmallInt;                 // number of coordinates
   stRes1: SmallInt;         // Not used
   stRes1: SmallInt;                   // Not used
   stRes2: SmallInt;         // Not used
   stRes2: SmallInt;                   // Not used
   stPoly: array[0..32767] of TPoint;  // coordinates of the symbol element
   stPoly: array[0..32767] of TPoint;  // coordinates of the symbol element
end;
end;
Line 187: Line 212:
<PRE>
<PRE>
TLineSym = packed record
TLineSym = packed record
  Size: integer;                        // see TBaseSym
  SymNum: integer;                      // see TBaseSym
  Otp: byte;                            // 2
  Flags: byte;                          // see TBaseSym
  Selected: boolean;                    // see TBaseSym
  Status: byte;                          // see TBaseSym
  PreferredDrawingTool: byte;            // see TBaseSym
  CsMode: byte;                          // see TBaseSym
  CsObjType: byte;                      // see TBaseSym
  CsCDFlags: byte;                      // see TBaseSym
  Extent: integer;                      // see TBaseSym
  FilePos: cardinal;                    // see TBaseSym
  notUsed1: Byte;           
  notUsed2: Byte;           
  nColors: SmallInt;                    // see TBaseSym
  Colors: array[0..13] of SmallInt;      // see TBaseSym
  Description: array[0..63] of char;    // see TBaseSym
  IconBits: array[0..483] of byte;      // see TBaseSym
  SymbolTreeGroup: Array[0..63] of Word; // see TBaseSym
  LineColor: SmallInt;                  // Line color
  LineWidth: SmallInt;                  // Line width
  LineStyle: SmallInt;                  // Line style
                                        //  0: bevel joins/flat caps
                                        //  1: round joins/round caps
                                        //  4: miter joins/flat caps
  DistFromStart: SmallInt;              // Distance from start
  DistToEnd: SmallInt;                  // Distance to the end
  MainLength: SmallInt;                  // Main length a
  EndLength: SmallInt;                  // End length b
  MainGap: SmallInt;                    // Main gap C
  SecGap: SmallInt;                      // Gap D
  EndGap: SmallInt;                      // Gap E
  MinSym: SmallInt;                      // -1: at least 0 gaps/symbols
                                        //  0: at least 1 gap/symbol
                                        //  1: at least 2 gaps/symbols
                                        //  etc.
  nPrimSym: SmallInt;                    // No. of symbols
  PrimSymDist: SmallInt;                // Distance
  DblMode: word;                        // Mode (Double line page)
  DblFlags: word;                        // Double line flags
                                        //    1: Fill color on
                                        //    2: Background color on
  DblFillColor: SmallInt;                // Fill color
  DblLeftColor: SmallInt;                // Left line/Color
  DblRightColor: SmallInt;              // Right line/Color
  DblWidth: SmallInt;                    // Width
  DblLeftWidth: SmallInt;                // Left line/Line width
  DblRightWidth: SmallInt;              // Right line/Line width
  DblLength: SmallInt;                  // Dashed/Distance a
  DblGap: SmallInt;                      // Dashed/Gap
  DblBackgroundColor: SmallInt;          // Reserved
  DblRes: array[0..1] of SmallInt;      // Reserved
  DecMode: word;                        // Decrease mode
                                        //  0: off
                                        //  1: decreasing towards the end
                                        //  2: decreasing towards both ends
                                        //  3: decreasing towards first symbol of line
  DecSymbolSize: SmallInt;              // Last symbol size
  DecSymbolDistance: boolean;            // Option to disable decreasing symbol distance
  DecSymbolWidth: boolean;              // Option to decrease symbol width (of line, circle, area elements)
  FrColor: SmallInt;                    // Color of the framing line
  FrWidth: SmallInt;                    // Line width of the framing line
  FrStyle: SmallInt;                    // Line style of the framing line
                                        //  0: bevel joins/flat caps
                                        //  1: round joins/round caps
                                        //  4: miter joins/flat caps
                                        //  PointedEnd := LineStyle and 2 > 0;
  PrimDSize: word;                      // number or coordinates (8 bytes) for the Main symbol A which follow this structure.
                                        // Each symbol header counts as 2 coordinates (16 bytes).
  SecDSize: word;                        // number or coordinates (8 bytes) for the Secondary symbol which follow the Main symbol A
                                        // Each symbol header counts as 2 coordinates (16 bytes).
  CornerDSize: word;                    // number or coordinates (8 bytes) for the Corner symbol which follow the Secondary symbol
                                        // Each symbol header counts as 2 coordinates (16 bytes).
  StartDSize: word;                      // number or coordinates (8 bytes) for the Start symbol C which follow the Corner symbol
                                        // Each symbol header counts as 2 coordinates (16 bytes).
  EndDSize: word;                        // number or coordinates (8 bytes) for the End symbol D which follow the Start symbol C
                                        // Each symbol header counts as 2 coordinates (16 bytes).
  UseSymbolFlags: Byte;                  // 1 = end symbol, 2 = start symbol, 4 = corner symbol, 8 = secondary symbol 
  Reserved: Byte;
end;
end;
</PRE>
</PRE>
Line 196: Line 300:
<PRE>
<PRE>
TAreaSym = packed record
TAreaSym = packed record
  Size: integer;                        // see TBaseSym
  SymNum: integer;                      // see TBaseSym
  Otp: byte;                            // 3
  Flags: byte;                          // see TBaseSym
  Selected: boolean;                    // see TBaseSym
  Status: byte;                          // see TBaseSym
  PreferredDrawingTool: byte;            // see TBaseSym
  CsMode: byte;                          // see TBaseSym
  CsObjType: byte;                      // see TBaseSym
  CsCDFlags: byte;                      // see TBaseSym
  Extent: integer;                      // see TBaseSym
  FilePos: cardinal;                    // see TBaseSym
  notUsed1: Byte;           
  notUsed2: Byte;           
  nColors: SmallInt;                    // see TBaseSym
  Colors: array[0..13] of SmallInt;      // see TBaseSym
  Description: array[0..63] of char;    // see TBaseSym
  IconBits: array[0..483] of byte;      // see TBaseSym
  SymbolTreeGroup: Array[0..63] of Word; // see TBaseSym
  BorderSym: integer;                    // Symbol for border line  activated if BorderOn is true
  FillColor: SmallInt;                  // Fill color activated if FillOn is true
  HatchMode: SmallInt;                  // Hatch mode
                                        //  0: None
                                        //  1: Single hatch
                                        //  2: Cross hatch
  HatchColor: SmallInt;                  // Color (Hatch page)
  HatchLineWidth: SmallInt;              // Line width
  HatchDist: SmallInt;                  // Distance
  HatchAngle1: SmallInt;                // Angle 1
  HatchAngle2: SmallInt;                // Angle 2
  FillOn: boolean;                      // Fill is activated
  BorderOn: boolean;                    // Border line is activated
  StructMode: byte;                      // Structure
                                        //  0: None
                                        //  1: aligned rows
                                        //  2: shifted rows
  StructDraw: byte;                      // Structure Drawing type                     
                                        // 0: Clip (until OCAD 11)
                                        // 1: draw elements completely inside area
                                        // 2: draw elements with center inside area
                                        // 3: draw elements partially inside area
  StructWidth: SmallInt;                // Width
  StructHeight: SmallInt;                // Height
  StructAngle: SmallInt;                // Angle
  StructIrregularVarX: byte;            // Horizontal variation in percent from StructWidth
  StructIrregularVarY: byte;            // Vertical variation in percent from StructHeight
  StructIrregularMinDist: SmallInt;      // Minimum distance between irregular symbols
  StructRes: SmallInt;                  // Reserved
  DataSize: word;                        // number of coordinates (each 8 bytes) which follow this structure, each object header
                                        // counts as 2 Coordinates (16 bytes)
end;
end;
</PRE>
</PRE>


Line 204: Line 359:
<PRE>
<PRE>
TTextSym = packed record
TTextSym = packed record
  Size: integer;                        // see TBaseSym
  SymNum: integer;                      // see TBaseSym
  Otp: byte;                            // 4
  Flags: byte;                          // see TBaseSym
  Selected: boolean;                    // see TBaseSym
  Status: byte;                          // see TBaseSym
  PreferredDrawingTool: byte;            // see TBaseSym
  CsMode: byte;                          // see TBaseSym
  CsObjType: byte;                      // see TBaseSym
  CsCDFlags: byte;                      // see TBaseSym
  Extent: integer;                      // see TBaseSym
  FilePos: cardinal;                    // see TBaseSym
  notUsed1: Byte;           
  notUsed2: Byte;           
  nColors: SmallInt;                    // see TBaseSym
  Colors: array[0..13] of SmallInt;      // see TBaseSym
  Description: array[0..63] of char;    // see TBaseSym
  IconBits: array[0..483] of byte;      // see TBaseSym
  SymbolTreeGroup: Array[0..63] of Word; // see TBaseSym
  FontName: string[31];                  // TrueType font
  FontColor: SmallInt;                  // Color
  FontSize: SmallInt;                    // 10 times the size in pt
  Weight: SmallInt;                      // Bold as used in the Windows GDI
                                        //  400: normal
                                        //  700: bold
  Italic: boolean;                      // true if Italic is checked
  Res1: byte;                            // not used
  CharSpace: SmallInt;                  // Char. spacing
  WordSpace: SmallInt;                  // Word spacing
  Alignment: SmallInt;                  // Alignment
                                        //  0: Bottom Left
                                        //  1: Bottom Center
                                        //  2: Bottom Right
                                        //  3: Bottom Justified
                                        //  4: Middle Left
                                        //  5: Middle Center
                                        //  6: Middle Right
                                        //  7: only in LText!
                                        //  8: Top Left
                                        //  9: Top Center
                                        //  10: Top Right
                                        //  11: only in LText!
  LineSpace: SmallInt;                  // Line spacing
  ParaSpace: SmallInt;                  // Space after Paragraph
  IndentFirst: SmallInt;                // Indent first line
  IndentOther: SmallInt;                // Indent other lines
  nTabs: SmallInt;                      // number of tabulators for text symbol
  Tabs: array[0..31] of longint;        // Tabulators
  LBOn: wordbool;                        // true if Line below On is checked
  LBColor: SmallInt;                    // Line color (Line below)
  LBWidth: SmallInt;                    // Line width (Line below)
  LBDist: SmallInt;                      // Distance from text
  Res2: SmallInt;
  FrMode: byte;                          // Framing mode
                                        //  0: no framing
                                        //  1: shadow framing
                                        //  2: line framing
                                        //  3: rectangle framing
  FrLineStyle: byte;                    // Framing line style
                                        //  0: default OCAD 8 Miter
                                        //  2: ps_Join_Bevel
                                        //  1: ps_Join_Round
                                        //  4: ps_Join_Miter
  PointSymOn: boolean;                  // Point symbol is activated
  PointSymNumber: integer;              // Point symbol for text symbol activated if PointSymOn is true
  Res3: string[18];                      // not used
  FrLeft: SmallInt;                      // Left border for rectangle framing
  FrBottom: SmallInt;                    // Bottom border for rectangle framing
  FrRight: SmallInt;                    // Right border for rectangle framing
  FrTop: SmallInt;                      // Top border for rectangle framing
  FrColor: SmallInt;                    // Framing color
  FrWidth: SmallInt;                    // Framing width for line framing
  Res4: SmallInt;                        // not used
  Res5: wordbool;                        // not used
  FrOfX: SmallInt;                      // Horizontal offset for shadow framing
  FrOfY: SmallInt;                      // Vertical offset for shadow framing
end;
end;
</PRE>
</PRE>
Line 214: Line 445:
<PRE>
<PRE>
TLTextSym = packed record
TLTextSym = packed record
  Size: integer;                        // see TBaseSym
  SymNum: integer;                      // see TBaseSym
  Otp: byte;                            // 6
  Flags: byte;                          // see TBaseSym
  Selected: boolean;                    // see TBaseSym
  Status: byte;                          // see TBaseSym
  PreferredDrawingTool: byte;            // see TBaseSym
  CsMode: byte;                          // see TBaseSym
  CsObjType: byte;                      // see TBaseSym
  CsCDFlags: byte;                      // see TBaseSym
  Extent: integer;                      // see TBaseSym
  FilePos: cardinal;                      // see TBaseSym
  notUsed1: Byte;           
  notUsed2: Byte;           
  nColors: SmallInt;                    // see TBaseSym
  Colors: array[0..13] of SmallInt;      // see TBaseSym
  Description: array[0..63] of char;    // see TBaseSym
  IconBits: array[0..483] of byte;      // see TBaseSym
  SymbolTreeGroup: Array[0..63] of Word; // see TBaseSym
  FontName: string[31];                  // TrueType font
  FontColor: SmallInt;                  // Color
  FontSize: SmallInt;                    // 10 times the value entered in Size
  Weight: SmallInt;                      // Bold as used in the Windows GDI
                                        //  400: normal
                                        //  700: bold
  Italic: boolean;                      // true if Italic is checked
  Res1: byte;                            // not used
  CharSpace: SmallInt;                  // Char. spacing
  WordSpace: SmallInt;                  // Word spacing
  Alignment: SmallInt;                  // Alignment   
                                        //  0: Bottom Left
                                        //  1: Bottom Center
                                        //  2: Bottom Right
                                        //  3: Bottom All line
                                        //  4: Middle Left
                                        //  5: Middle Center
                                        //  6: Middle Right
                                        //  7: Middle All line
                                        //  8: Top Left
                                        //  9: Top Center
                                        //  10: Top Right
                                        //  11: Top All line
  FrMode: byte;                          // Framing mode
                                        //  0: no framing
                                        //  1: shadow framing
                                        //  2: line framing
  FrLineStyle: byte;                    // Framing line style
                                        //  0: default OCAD 8 and 9.0 Miter
                                        //  2: ps_Join_Bevel
                                        //  1: ps_Join_Round
                                        //  4: ps_Join_Miter
  Res2: string[31];                      // not used
  FrColor: SmallInt;                    // Framing color
  FrWidth: SmallInt;                    // Framing width for line framing
  Res3: SmallInt;                        // not used
  Res4: wordbool;                        // not used
  FrOfX: SmallInt;                      // Horizontal offset for shadow framing
  FrOfY: SmallInt;                      // Vertical offset for shadow framing
end;
end;
</PRE>
</PRE>


=== Rectangle Symbol ===
=== Rectangle Symbol ===
Rectangle symbols are stored in the following structure. In the explanation the terms used in the Rectangle Symbol dialog box are shown. The unit of all dimensions is 0.01 mm.
<PRE>
TRectSym = packed record
  Size: integer;                        // see TBaseSym
  SymNum: integer;                      // see TBaseSym
  Otp: byte;                            // 7
  Flags: byte;                          // see TBaseSym
  Selected: boolean;                    // see TBaseSym
  Status: byte;                          // see TBaseSym
  PreferredDrawingTool: byte;            // see TBaseSym
  CsMode: byte;                          // see TBaseSym
  CsObjType: byte;                      // see TBaseSym
  CsCDFlags: byte;                      // see TBaseSym
  Extent: integer;                      // see TBaseSym
  FilePos: cardinal;                      // see TBaseSym
  notUsed1: Byte;           
  notUsed2: Byte;           
  nColors: SmallInt;                    // see TBaseSym
  Colors: array[0..13] of SmallInt;      // see TBaseSym
  Description: array[0..63] of char;    // see TBaseSym
  IconBits: array[0..483] of byte;      // see TBaseSym
  SymbolTreeGroup: Array[0..63] of Word; // see TBaseSym
  LineColor: SmallInt;                  // Line color
  LineWidth: SmallInt;                  // Line width
  Radius: SmallInt;                      // Corner radius
  GridFlags: word;                      // A combination of the flags
                                        //  1: Grid On
                                        //  2: Numbered from the bottom
  CellWidth: SmallInt;                  // Cell width
  CellHeight: SmallInt;                  // Cell height
  ResGridLineColor: SmallInt;            // Reserved
  ResGridLineWidth: SmallInt;            // Reserved
  UnnumCells: SmallInt;                  // Unnumbered Cells
  UnnumText: string[3];                  // Text in unnumbered Cells
  LineStyle: SmallInt;                  // Line style
                                        //  1: flat caps
                                        //  0: round caps
                                        //  4: flat caps
  Res2: string[31];                      // not used
  ResFontColor: SmallInt;                // Reserved
  FontSize: SmallInt;                    // font size
  Res3: SmallInt;                        // not used
  Res4: wordbool;                        // not used
  Res5: SmallInt;                        // not used
  Res6: SmallInt;                        // not used
end;
</PRE>


== Objects ==
== Objects ==
Each Object Index Block contains the position of the next Object Index Block and the file position and other information of 256 objects.
=== Object Index Block ===
=== Object Index Block ===
=== OCAD Objets ===
<PRE>
TObjectIndexBlock = record  // Size: 10296 Bytes
  NextObjectIndexBlock: integer;
  Table: array[0..255] of TObjectIndex;
end;
</PRE>
 
=== OCAD Object Index===
<PRE>
TObjectIndex = packed record // Size: 40 Byte
  rc: LRect;                // bounding box (lower left and upper right)
  Pos: integer;              // file position of the object -> TOcadObject
  Len: integer;              // number of coordinate pairs, the size of the object in the file is then calculated by: 32 + 8*Len
                            // Note: this is reserved space in the file, the effective length of the object may be shorter
  Sym: integer;              // -4 = layout vector object                   
                            // -3 = image object, imported from DTP formats (eg AI, PDF, SVG)
                            // -2 = graphic object
                            // -1 = imported, no symbol assigned or symbol number
  ObjType: byte;            // 1 = Point object
                            // 2 = Line object
                            // 3 = Area object
                            // 4 = Unformatted text
                            // 5 = Formatted text
                            // 6 = Line text
                            // 7 = Rectangle object
  EncryptedMode: byte;      // 0 = normal                                   
                            // 1 = encoded object (TOcadObject)
  Status: byte;              // 0 = deleted (not undo) (eg from symbol editor or course setting)
                            // 1 = normal
                            // 2 = hidden
                            // 3 = deleted for undo
  ViewType: byte;            // 0 = normal object
                            // 1 = course setting object
                            // 2 = modified preview object
                            // 3 = unmodified preview object
                            // 4 = temporary object (symbol editor or control description)
  Color: SmallInt;          // Color number for graphic objects, -1 for image or layout objects
  Group: SmallInt;          // Group number of grouped objects             
  ImpLayer: SmallInt;        // Layer number of imported objects, 0 means no layer number
  DbDatasetHash: byte;      // Internal use       
  DbKeyHash: byte;          // Internal use
end;
</PRE>
 
=== OCAD Object ===
<PRE>
TOcadObject = packed record        //
  Sym: Integer;                    // >0 = symbol number
                                    // -4 = layout vector object             
                                    // -3 = from PDF, AI
                                    // -2 = graphic object
                                    // -1 = imported, no symbol assigned or symbol number
  Otp: Byte;                        // object typ
  _Customer: Byte;                  //
  Ang: SmallInt;                    // Angle, unit is 0.1 degrees, used for
                                    // - point object
                                    // - area objects with structure
                                    // - unformatted text objects
                                    // - rectangle objects
  Col: integer;                    // Color number for graphic objects, color value for image or layout objects
  LineWidth: SmallInt;              // Line width for graphic, image and layout objects
  DiamFlags: SmallInt;              // Line style for graphic objects
  ServerObjectId: Integer;          // added for server objects               
  Height: Integer;                  // Height [1/256 mm]                     
  CreationDate: Double              // creation date
  MultirepresentationId: Cardinal;  // id references to the main object       
  ModificationDate: Double          // modification date                         
  nItem: Cardinal;                  // number of coordinates in the Poly array
  nText: Word;                      // number of characters in the Poly, array used for storing text for line text objects and text objects
                                    // for all other objects it is 0
  nObjectString: Word;              // length of object string
  nDatabaseString: Word;            // length of database link
  ObjectStringType: Byte;          // type of object string in Poly array
                                    // None = 0
                                    // Coures setting object = 1 
                                    // Coures setting preview object =
                                    // Coures setting layout object =
                                    // Coures setting thematic object =
  Res1: Byte;                      // not used                     
  Poly: TDPoly;                    // array[0..] coordinates of the object followed by a zero-terminated string
                                    // if nText > 0 TCord is explained at the beginning of this description
end;
</PRE>


== Parameter Strings ==
== Parameter Strings ==
Line 242: Line 663:
   Len: integer;                      // length reversed for the string
   Len: integer;                      // length reversed for the string
   RecType: integer;                  // string typ number, if < 0 then deleted string
   RecType: integer;                  // string typ number, if < 0 then deleted string
   ObjIndex: integer;                  // number of the object
   ObjIndex: integer;                  // index of the object
end;
end;
</PRE>
</PRE>
Line 260: Line 681:
Some of String Types (number < 1000) may have multiple instances of the same type. They have to be stored as lists.
Some of String Types (number < 1000) may have multiple instances of the same type. They have to be stored as lists.


<PRE>
si_CsObject = 1;
  // First = Code
  // Y = Type (s = start, c = control, m = marked route, f = finish, d = control description, n = course name, u = start number
  //          v = variation code, t = text block)
  // b = Symbol for field B (Trail-O, Macr-O, Micr-O)                         
  // c = Symbol for field C
  // d = Symbol for field D
  // e = Symbol for field E
  // f = Symbol for field F
  // g = Symbol for field G
  // h = Symbol for field H
  // m = f: Funnel tapes
  // o = t: Text control description object; '': iof symbols
  // p = Control description corner: 0=top left; 1=bottom left                 
  // s = Size information
  // t = Text for text description and text block
  // u = elevation user [double]                                           
  // v = is elevation user used [boolean]
</PRE>
<PRE>
<PRE>
si_Course = 2;
si_Course = 2;
Line 332: Line 733:
   // t = table
   // t = table
   // k = key field
   // k = key field
  // r = secondary table, reference key
  // s = secondary table, table key
  // m = secondary table, key
   // y = symbol field
   // y = symbol field
  // b = Assign new symbol when changing field value [boolean, false]       
   // x = text field
   // x = text field
   // f = size field
   // f = size field
Line 340: Line 745:
   // h = easting field
   // h = easting field
   // v = northing field
   // v = northing field
   // g = angle field                                                          
   // g = angle field
</PRE>
   // j = date field                                                         
<PRE>
si_DbObject = 5;
  // First = key
   // d = Dataset
</PRE>
</PRE>
<PRE>
<PRE>
Line 351: Line 752:
</PRE>
</PRE>
<PRE>
<PRE>
si_PrevObj = 7;
  // First = course name;
  // o = object
  // d = description (eg object name)
  // f = from, startpoint of line
  // t = to, end point of line
si_BackgroundMap = 8;
si_BackgroundMap = 8;
  // First = file name
   // a = angle omega [double, 8]
   // a = angle omega [double, 8]
   // b = angle phi [double, 8]
   // b = angle phi [double, 8]
Line 371: Line 767:
   // u = pixel size x [double, 10]
   // u = pixel size x [double, 10]
   // v = pixel size y [double, 10]
   // v = pixel size y [double, 10]
  // w = width (number of pixels)                                        NOT USED//10-0793
   // i = is infrared image (0=undefined, 1=32bit-infrared, 2=32bit RGB)           
  // h = height (number of pixels)                                        NOT USED
   // m = is WMS online background map                                             
   // i = is infrared image (0=undefined, 1=32bit-infrared, 2=32bit RGB)          //11-0089
   // k = WMS server name                                                           
   // m = is WMS online background map                                            //11-0150
   // l = WMS layer name                                                        
   // k = WMS server name                                                          //11-0150
   // n = WMS layer scale range                                  
   // l = WMS layer name                                                           //11-0150
</PRE>
   // n = WMS layer scale range                                                   //11-0956
<PRE>
si_Color = 9;
si_Color = 9;
   // First = name
   // First = name
Line 389: Line 785:
   // s = spot color separation name
   // s = spot color separation name
   // p = percentage in the spot color separation
   // p = percentage in the spot color separation
</PRE>
<PRE>
si_SpotColor = 10;
si_SpotColor = 10;
   // First = name
   // First = name
Line 399: Line 797:
   // y = yellow
   // y = yellow
   // k = black
   // k = black
si_FileInfo_OCAD10 = 11; //replace in OCAD 11 by si_MapNotes = 1061              //11-0247
</PRE>
<PRE>
si_Zoom = 12;
si_Zoom = 12;
   // x = offset x
   // x = offset x
   // y = offset y
   // y = offset y
   // z = zoom
   // z = zoom
</PRE>
<PRE>
si_ImpLayer = 13;
si_ImpLayer = 13;
   // First = Name
   // First = Name
   // n = layer number
   // n = layer number
</PRE>
<PRE>
si_OimFind = 14;
si_OimFind = 14;
   // First = Name
   // First = Name
Line 429: Line 832:
   // G = Hotspot color green
   // G = Hotspot color green
   // B = Hotspot color blue
   // B = Hotspot color blue
</PRE>
<PRE>
si_SymTree = 15;
si_SymTree = 15;
   // First = name
   // First = name  
  // f = first node in subgroup (for OCAD9 compability, not used from 24.05.2006)  //9-5075
   // g = group id  
   // g = group id
  // l = last node in subgroup  (or OCAD9 compability, not used from 24.05.2006)  //9-5075
   // v = visible
   // v = visible
   // e = is node expanded (boolean)                                               //9-5075
   // e = is node expanded (boolean)                                              
   // i = Level in Tree                                                             //9-5075
   // i = Level in Tree                                                          
si_CryptInfo = 16;                                                                //10-5001
</PRE>
  // Description is in TCryptInfo class
<PRE>
si_Bookmark = 18;                                                                 //10-0010
si_Bookmark = 18;                                                            
   // First = bookmark name
   // First = bookmark name
   // d = description
   // d = description
Line 445: Line 848:
   // y = offset y
   // y = offset y
   // z = zoom
   // z = zoom
si_Selection = 19;                                                               //11-0302
</PRE>
<PRE>
si_Selection = 19;                                                            
   // First = selection name
   // First = selection name
   // n = number
   // n = number
   // o = object ids
   // o = object ids
si_GpsAdjustPar = 21;                                                            //10-0199
</PRE>
  // m = Gps adjusted mode 1=true; 0=false
<PRE>
  // n = number of GPS adjustment points --> GpsAdjustPoint
si_Group = 23;                                                        
  // a = GPS angle
si_GpsAdjustPoints = 22;                                                          //10-0199
  // First = name
  // x = offset x on map
  // y = offset y on map
  // h = Longitude
  // v = Latitude
  // c = checked (true/false)                                                    //10-0265
si_Group = 23;                                                           //10-0140//11-0298
   // First = Name
   // First = Name
   // n = group number
   // n = group number
si_RecentDocs = 24;                                                               //10-0226
</PRE>
<PRE>
si_RecentDocs = 24;                                                            
   // First = file name
   // First = file name
si_CsAutoCdAllocationTable = 25;                                                 //10-0313
</PRE>
<PRE>
si_CsAutoCdAllocationTable = 25;                                              
   // First = Map symbol number (STRING)
   // First = Map symbol number (STRING)
   // a = Control description symbol 0 (STRING)
   // a = Control description symbol 0 (STRING)
Line 475: Line 875:
   // g = Control description dragged direction (STRING)
   // g = Control description dragged direction (STRING)
   // h = Control description click (STRING)
   // h = Control description click (STRING)
si_RulerGuidesList = 26;                                                         //11-0186
</PRE>
<PRE>
si_RulerGuidesList = 26;                                                        
   // h = horizontal guide (0=vertical, 1=horizontal)
   // h = horizontal guide (0=vertical, 1=horizontal)
   // c = x or y ccordiante (INTEGER, OCAD coordinate)
   // c = x or y ccordiante (INTEGER, OCAD coordinate)
si_LayoutObjects = 27;                                                           //11-0200
</PRE>
<PRE>
si_LayoutObjects = 27;                                                        
   // First = path for images; description for vector objects
   // First = path for images; description for vector objects
   // r = type: raster image object = 1; vector object = 0
   // r = type: raster image object = 1; vector object = 0
Line 490: Line 894:
   // u = pixel size x
   // u = pixel size x
   // v = pixel size y
   // v = pixel size y
   // i = is infrared image (0=undefined, 1=32bit-infrared, 2=32bit RGB)           //11-0089
   // i = is infrared image (0=undefined, 1=32bit-infrared, 2=32bit RGB)        
   // n = ActObjectIndex
   // n = ObjectIndex
si_LayoutFontAttributes = 28;                                                    //11-0200
</PRE>
  // First = font name
<PRE>
  // s = font size
si_PrintAndExportRectangleList = 29;                                          
si_PrintAndExportRectangleList = 29;                                             //11-0393
   // First = Name
   // First = Name
   // b = bottom [integer, ocad unit]
   // b = bottom [integer, ocad unit]
Line 501: Line 904:
   // r = right [integer, ocad unit]
   // r = right [integer, ocad unit]
   // t = top [integer, ocad unit]
   // t = top [integer, ocad unit]
</PRE>
<PRE>
si_DisplayPar = 1024;
si_DisplayPar = 1024;
   // f = Show symbol favorites
   // f = Show symbol favorites
Line 506: Line 911:
   // s = selected symbol
   // s = selected symbol
   // t = Show symbol tree
   // t = Show symbol tree
   // h = horizontal splitter (pixel from top)                                     //9-0225
   // h = horizontal splitter (pixel from top)                                  
   // v = vertical splitter (pixel from right)                                     //9-0225
   // v = vertical splitter (pixel from right)                                    
   // b = horizontal splitter for background map panel (pixel from top)           //10-0077
   // b = horizontal splitter for background map panel (pixel from top)          
   // i = display mode for unsymbolized objects (0=normal, 2=hidden)               //10-0089
   // i = display mode for unsymbolized objects (0=normal, 2=hidden)            
   // j = display mode for graphic objects (0=normal, 2=hidden)                    //10-0089
   // j = display mode for graphic objects (0=normal, 2=hidden)                     
   // k = display mode for image objects (0=normal, 1=protect, 2=hidden) //10-0089//11-0277
   // k = display mode for image objects (0=normal, 1=protect, 2=hidden)  
   // l = display mode for layout objects (0=normal, 2=hidden)                     //10-0089
  // l = display mode for layout objects (0=normal, 2=hidden)                   
</PRE>
<PRE>
si_DemClassifyVegetationClassList = 30;                                          //11-1112
  // First = Name
  // a = fromHeight100
  // b = toHeight100
  // c = fromColorCyan
  // d = fromColorMagenta
  // e = fromColorYellow
  // f = fromColorBlack
  // g = toColorCyan
  // h = toColorMagenta
  // i = toColorYellow
  // j = toColorBlack
</PRE>
<PRE>
si_CsTextBlock = 31;
</PRE>
<PRE>
si_ThematicMapThemes = 32;                                                        //12-0192
</PRE>
<PRE>
si_ThematicMapVisualizationProperties = 33;                                      //12-0192
</PRE>
<PRE>
si_ThematicMapObjects = 34;                                                      //12-0192
</PRE>
<PRE>
si_Layers = 35;                                                                  //12-0192
</PRE>
<PRE>
si_SymbolStatusManager = 36;
  // First = Name
  // s = status string
</PRE>
<PRE>
si_MrBoundRects = 50;
</PRE>
<PRE>
si_MrProjectMatrix = 51;
</PRE>
<PRE>
si_MrOptions = 52;
</PRE>
<PRE>
si_DisplayPar = 1024;
  // f = Show symbol favorites
  // g = selected symbol group
  // s = selected symbol
  // t = Show symbol tree
  // h = horizontal splitter (pixel from top)                                 
  // v = vertical splitter (pixel from right)                                   
  // b = horizontal splitter for background map panel (pixel from top)         
  // i = display mode for unsymbolized objects (0=normal, 2=hidden)           
  // j = display mode for graphic objects (0=normal, 2=hidden)                 
  // k = display mode for image objects (0=normal, 1=protect, 2=hidden)
   // l = display mode for layout objects (0=normal, 2=hidden)          
</PRE>
<PRE>
si_OimPar = 1025;
si_OimPar = 1025;
   // First = OpenLayers
   // First = OpenLayers
   // a = Antialiasing [boolean]                                                 //11-0475
   // a = Anti-Aliasing [boolean]                                                
   // b = Border width [integer]
   // b = Border width [integer]
   // A = Map Title [string]
   // A = Map title [string]
   // C = Map Subtitle [string]
   // C = Map subtitle [string]
  // D = Base layer name [string]
   // E = Editlayer enable [boolean]
   // E = Editlayer enable [boolean]
   // F = Searchbox enable [boolean]
   // F = Searchbox enable [boolean]
  // s = Search/listbox with selection [boolean]
   // m = Do not create tiles [boolean]
   // m = Do not create tiles [boolean]
   // H = Show layer selector [boolean]
   // H = Show layer selector [boolean]
Line 538: Line 1,004:
   // Q = Subheader background color [string] as hex
   // Q = Subheader background color [string] as hex
   // X = Filename of last Safeplace [string]
   // X = Filename of last Safeplace [string]
   // f = Generate map from zoomlevel [integer]                                   //11-0865
   // f = Generate map from zoomlevel [integer]                                  
   // t = Generate map to zoomlevel [integer]
   // t = Generate map to zoomlevel [integer]
</PRE>
<PRE>
si_PrintPar = 1026;
si_PrintPar = 1026;
   // a = print scale
   // a = print scale
Line 559: Line 1,027:
   // s = HorScal      (course setting only)
   // s = HorScal      (course setting only)
   // t = VerScal      (course setting only)
   // t = VerScal      (course setting only)
   // p = reference point for part of map setup ([0..8])                           //11-0398
   // p = reference point for part of map setup ([0..8])                        
</PRE>
<PRE>
si_CdPrintPar = 1027;
si_CdPrintPar = 1027;
  // t = Title
   // s = Size
   // s = Size
si_DefaultBackgroundMapsPar = 1028;                                               //11-0093
</PRE>
<PRE>
si_DefaultBackgroundMapsPar = 1028;                                            
   // s = default scale
   // s = default scale
</PRE>
<PRE>
si_EpsPar = 1029;
si_EpsPar = 1029;
   // r = EPS resolution
   // r = EPS resolution
</PRE>
<PRE>
si_ViewPar = 1030;
si_ViewPar = 1030;
   // b = draft mode IGN for ocad-map [int: 0..100]
   // b = draft mode IGN for ocad-map [int: 0..100]
Line 578: Line 1,053:
   // z = zoom
   // z = zoom
   // h = hatch areas (0 = normal, 1 = hatched)
   // h = hatch areas (0 = normal, 1 = hatched)
   // k = keyline mode (0 = normal, 1 = keyline)                                   //11-0289
   // k = keyline mode (0 = normal, 1 = keyline)                                
   // i = map visible                                                             //10-0080
   // i = map visible                                                            
   // l = hidden layout
   // l = hidden layout
   // OLD: a, p, s
   // OLD: a, p, s
</PRE>
<PRE>
si_CoursePar = 1031;
si_CoursePar = 1031;
   // a = create classes automatically
   // a = create classes automatically
   // b = background for control descriptions
   // b = background for control description
  // B = draw white background also in draft mode (BOOL)
   // c = numbering (0 = number, 1 = number and code, 2 = code only)
   // c = numbering (0 = number, 1 = number and code, 2 = code only)
   // d = control descriptions for all controls
   // d = control descriptions for all controls
Line 593: Line 1,071:
   // l = distance to connection line
   // l = distance to connection line
   // n = distance to number
   // n = distance to number
   // o = lock for cs object positions (0=unlocked, 1=locked) (BOOL)               //10-0309
   // o = lock for cs object positions (0=unlocked, 1=locked) (BOOL)            
   // p = fullstop after control number                                           //10-0307
   // p = fullstop after control number (BOOL)                                         
   // q = lock for cs courses (0=unlocked, 1=locked) (BOOL)                       //10-0325
   // q = lock for cs courses (0=unlocked, 1=locked) (BOOL)                      
   // r = export relay combinations
   // r = export relay combinations
   // s = cell size control description
   // s = cell size control description
   // t = course title
   // t = course title
   // w = write number of start to control description                             //10-0026
  // u = punching system (0=SportIdent, 1=Emit, 2=other) (Integer)
   // w = write number of start to control description (BOOL)                           
</PRE>
<PRE>
si_TiffPar = 1032;
si_TiffPar = 1032;
   // c = compression (1 = no compression, 2 = CCITT, 4 = FaxG4, 5 = LZW)
   // c = compression (1 = no compression, 2 = CCITT, 4 = FaxG4, 5 = LZW)
  // g = GeoTIFF      (not any more used since 10-0093)
</PRE>
  // s = pixel size  (not any more used since 10-0093)
<PRE>
  // w = TFW file    (not any more used since 10-0093)
si_TilesPar = 1033;
si_TilesPar = 1033;
   // w = width
   // w = width
   // h = height
   // h = height
</PRE>
<PRE>
si_DbPar = 1034;
si_DbPar = 1034;
   // d = dataset
   // d = dataset
   // l = last code
   // l = last code
   // n = create new record
   // n = create new record
</PRE>
<PRE>
si_ExportPar = 1035;
si_ExportPar = 1035;
   // First = Format (AI, BMP, DXF, GIF, JPEG, OIM, PDF, Shape, SVG, TIFF)
   // First = Format (AI, BMP, DXF, GIF, JPEG, OIM, PDF, Shape, SVG, TIFF)
   // a = Anti-Aliasing
   // a = Anti-Aliasing
   // b = combined spot colors
   // b = combined spot colors
   // c = color format (0 = 24 bit, 1 = 256 colors, 2 = grayscale, 3 = 1 bit, 4 = halftone screen)
   // c = color format (0 = 24 bit, 1 = 256 colors, 2 = grayscale, 3 = 1 bit, 4 = halftone screen)  
  // d = -> not used again, in OCAD 11 in DxfExportPar                            //11-0673
   // g = Raster (geo-referenced)export mode 0 = resolution, 1 = pixel size    
   // g = Raster (geo-referenced)export mode 0 = resolution, 1 = pixel size       //10-0093
   // i = pixel size (in Meter)                                                
   // i = pixel size (in Meter)                                                   //10-0093
   // l = color correction (0 off, 1 on)
   // l = color correction (0 off, 1 on)
   // o = spot color separations (0=CMYK, 1=spot colors)
   // o = spot color separations (0=CMYK, 1=spot colors)
   // p = part of map (0 off, 1 on)
   // p = part of map (0 off, 1 on)
   // q = JPEG quality (INTEGER, [0..100])                                        //11-0192
   // q = JPEG quality (INTEGER, [0..100])                                         
   // r = resolution
   // r = resolution
   // s = scale
   // s = scale
   // t = tiles (0 off, 1 on)
   // t = tiles (0 off, 1 on)
   // w = world file                                                               //10-0093
   // w = world file                                                            
   // z = compressed svg file (0 off, 1 on)
   // z = compressed svg file (0 off, 1 on)
</PRE>
<PRE>
si_CsExpTextPar = 1037;
si_CsExpTextPar = 1037;
   // C = classes (0 = courses, 1 = classes)
   // C = classes (0 = courses, 1 = classes)
   // L = export climbing (0 = off, 1 = on)
   // L = export climbing (0 = off, 1 = on)
</PRE>
<PRE>
si_CsExpStatPar = 1038;
si_CsExpStatPar = 1038;
   // C = classes (0 = courses, 1 = classes)
   // C = classes (0 = courses, 1 = classes)
Line 640: Line 1,127:
   // e = separator 3
   // e = separator 3
   // f = tab 3
   // f = tab 3
</PRE>
<PRE>
si_ScalePar = 1039;
si_ScalePar = 1039;
   // a = real world angle
   // a = real world angle
   // b = additional local horizontal offset in m                                 //10-0084
   // b = additional local easting offset in m                                
   // c = additional local vertical offset in m                                   //10-0084
   // c = additional local northing offset in m                                
   // d = grid distance for real world  in m [double, 6]
   // d = grid distance for real world  in m [double, 6]
   // g = grid distance for paper coordinates in mm [double, 6]
   // g = grid distance for paper coordinates in mm [double, 6]
Line 649: Line 1,138:
   // m = map scale
   // m = map scale
   // r = real world cord (0 = paper, 1 = real world)
   // r = real world cord (0 = paper, 1 = real world)
   // x = real world offset x
   // x = real world offset easting
   // y = real world offset y
   // y = real world offset northing
</PRE>
<PRE>
si_DbCreateObjPar = 1040;
si_DbCreateObjPar = 1040;
   // c = condition
   // c = condition
Line 660: Line 1,151:
   // x = horizontal field
   // x = horizontal field
   // y = vertical field
   // y = vertical field
</PRE>
<PRE>
si_SelectedSpotColors = 1041;
si_SelectedSpotColors = 1041;
si_XmlScriptPar = 1042;                                                           //9-0334
</PRE>
<PRE>
si_XmlScriptPar = 1042;                                                        
   // f = last used file
   // f = last used file
si_BackupPar = 1043;                                                             //10-0011
</PRE>
<PRE>
si_BackupPar = 1043;                                                            
   // p = path
   // p = path
si_ExportPartOfMapPar = 1044;                                                     //10-0016
</PRE>
<PRE>
si_ExportPartOfMapPar = 1044;                                                  
   // b = boundary (0=rectangular boundries, 1=selected object for boundries)
   // b = boundary (0=rectangular boundries, 1=selected object for boundries)
   // s = export with selected object (0=false, 1=true)
   // s = export with selected object (0=false, 1=true)
   // r = reference point for part of map setup ([0..8])                           //11-0390
   // r = reference point for part of map setup ([0..8])                        
   // l = export links to databases (0=false, 1=true)                             //11-1043
   // l = export database links (0=false, 1=true)                          
si_DemPar = 1045;                                                                 //10-0177
</PRE>
<PRE>
si_DemPar = 1045;                                                              
   // First = file
   // First = file
   // l = DEM loaded
   // l = DEM loaded
   // f = Frame visible
   // f = Frame visible
   // i = last used import folder                                                 //10-0532
   // i = last used import folder                                              
si_GpsImportFilePar = 1046;                                                       //10-0225
</PRE>
<PRE>
si_GpsImportFilePar = 1046;                                                    
   // a = assign symbol (true/false)
   // a = assign symbol (true/false)
   // t = symbol number for tracks
   // t = symbol number for tracks
   // w = symbol number for waypoint
   // w = symbol number for waypoint
si_ImportXyz = 1047;                                                             //10-0230
</PRE>
<PRE>
si_ImportCsv = 1047;                                                            
   // n = point symbol number
   // n = point symbol number
si_RelayCoursesDialog = 1048;                                                     //10-0306
  // t = text symbol number
</PRE>
<PRE>
si_RelayCoursesDialog = 1048;                                                  
   // First = last exported or printed course (STRING)
   // First = last exported or printed course (STRING)
   // l = legs (-1=All) (INT)
   // l = legs (-1=All) (INT)
Line 687: Line 1,195:
   // s = start number (-1=All) (STRING)
   // s = start number (-1=All) (STRING)
   // v = variants index (-1=All) (INT)
   // v = variants index (-1=All) (INT)
si_CsAutoControlDescription = 1049;                                               //10-0313
</PRE>
<PRE>
si_CsAutoControlDescription = 1049;                                            
   // First = ocd background map file name for auto control description (STRING)
   // First = ocd background map file name for auto control description (STRING)
   // a = auto control description (0=off, 1=off) (BOOL)
   // a = auto control description (0=off, 1=off) (BOOL)
si_GpxExportPar = 1050;                                                          //10-0581
</PRE>
<PRE>
si_GpxExportPar = 1050;                                                           
   // First = description
   // First = description
   // a = author
   // a = author
   // k = keywords
   // k = keywords
   // r = routes or tracks (true = routes, false = tracks)
   // r = routes or tracks (true = routes, false = tracks)
si_KmlInfo = 1051;                                                       //9-5158//10-0584
</PRE>
<PRE>
si_KmlInfo = 1051;                                                      
   // Description in ExpKml.pas
   // Description in ExpKml.pas
si_GpsRouteAnalyzer = 1052;                                                       //10-0727
</PRE>
<PRE>
si_GpsRouteAnalyzer = 1052;                                                    
   // First = Project file
   // First = Project file
si_CoordinateSystemPar = 1053;                                           //10-0751//11-0484
</PRE>
<PRE>
si_CoordinateSystemPar = 1053;       // only used for user defined grid                               
   //First = description
   //First = description
   // d = datumId
   // d = datumId
Line 716: Line 1,234:
   // l = location
   // l = location
   // z = azimuth
   // z = azimuth
   // g = EPSG code                                                               //11-0652
   // g = EPSG code                                                              
si_GraticulePar = 1054;                                                          //10-0769
</PRE>
<PRE>
si_GraticulePar = 1054;                                                           
   // h = horizontal distance
   // h = horizontal distance
   // v = vertical distance
   // v = vertical distance
   // l = symbol number for grid lines
   // l = symbol number for grid lines
   // t = symbol number for text labels
   // t = symbol number for text labels
si_GraticuleNameIndexPar = 1055;                                                 //10-0792
</PRE>
<PRE>
si_GraticuleNameIndexPar = 1055;                                                
   // s = style
   // s = style
   // x = index origin of longitude
   // x = index origin of longitude
Line 728: Line 1,250:
   // h = horizontal distance
   // h = horizontal distance
   // v = vertical distance
   // v = vertical distance
si_KmzExportPar = 1056;                                                           //10-0846
</PRE>
<PRE>
si_KmzExportPar = 1056;                                                        
   // first = Name: string
   // first = Name: string
   // t = Tiles: integer (0 = no tiles, 1 = Garmin Custom Maps optimized, 2 = tiles)
   // t = Tiles: integer (0 = no tiles, 1 = Garmin Custom Maps optimized, 2 = tiles)
si_LegendPar = 1057;                                                             //11-0141
</PRE>
<PRE>
si_LegendPar = 1057;                                                            
   // u = show only Used Symbols
   // u = show only Used Symbols
   // v = show also hidden symbols                                                 //11-0801
   // v = show also hidden symbols                                              
   // h = icon Height
   // h = icon Height
   // w = icon Height
   // w = icon Height
Line 745: Line 1,271:
   // d = description Symbol
   // d = description Symbol
   // s = show Symbol Number
   // s = show Symbol Number
si_RulersPar = 1058;                                                             //11-0183
</PRE>
<PRE>
si_RulersPar = 1058;                                                          
   // no First
   // no First
   // s = show (0=false, 1=true)
   // s = show (0=false, 1=true)
Line 751: Line 1,279:
   // y = ruler origin y (INTEGER, OCAD coordinate)
   // y = ruler origin y (INTEGER, OCAD coordinate)
   // m = move also ruler guides (0=false, 1=true)
   // m = move also ruler guides (0=false, 1=true)
si_RulerGuidesPar = 1059;                                                        //11-0186
</PRE>
<PRE>
si_RulerGuidesPar = 1059;                                                         
   // no First
   // no First
   // s = show (0=false, 1=true)
   // s = show (0=false, 1=true)
   // l = lock (0=false, 1=true)
   // l = lock (0=false, 1=true)
si_DbOptions = 1060;                                                             //11-0215
</PRE>
<PRE>
si_DbOptions = 1060;                                                            
   // c = create record when cutting object (0=false, 1=true)
   // c = create record when cutting object (0=false, 1=true)
   // d = delete record when deleting object (0=false, 1=true)
   // d = delete record when deleting object (0=false, 1=true)
si_MapNotes = 1061;                                                               //11-0247
</PRE>
<PRE>
si_MapNotes = 1061;                                                            
   // First = text
   // First = text
si_SendFileByEmail = 1062;                                                        //11-0292
</PRE>
<PRE>
si_SendFileByEmail = 1062;                                                         
   // First = subject
   // First = subject
   // t = to
   // t = to
Line 767: Line 1,303:
   // b = add loaded databases (0=false, 1=true)
   // b = add loaded databases (0=false, 1=true)
   // l = add loaded databases (0=false, 1=true)
   // l = add loaded databases (0=false, 1=true)
si_MapGridPar = 1063;                                                            //11-0564
</PRE>
<PRE>
si_MapGridPar = 1063;                                                             
   // a = angle
   // a = angle
   // e = easting offset
   // e = easting offset
Line 775: Line 1,313:
   // x = create easting grid lines
   // x = create easting grid lines
   // y = create northing grid lines
   // y = create northing grid lines
   // j = create vertices at grid junctions                                       //11-0977
   // j = create vertices at grid junctions                                      
   // l = symbol number for grid lines
   // l = symbol number for grid lines
  // s = grid labels
   // t = symbol number for text labels
   // t = symbol number for text labels
si_DemSlopePar = 1064;                                                           //11-0450
</PRE>
<PRE>
si_DemSlopePar = 1064;                                                          
   // m = Method: 0 = continuous; 1 = black/white
   // m = Method: 0 = continuous; 1 = black/white
   // c = Slope for black pixels in continuous method
   // c = Slope for black pixels in continuous method
   // b = Slope for black pixels in black/white method
   // b = Slope for black pixels in black/white method
   // l = load slope map as background map
   // l = load slope map as background map
si_DemProfilePar = 1065;                                                         //11-0573
</PRE>
<PRE>
si_DemProfilePar = 1065;                                                      
   // First = profile template path
   // First = profile template path
   // a = scale option (0=auto-scale, 1=used defined scale)
   // a = scale option (0=auto-scale, 1=used defined scale)
Line 795: Line 1,338:
   // z = elevation resolution
   // z = elevation resolution
   // k = elevation factor
   // k = elevation factor
si_DemHillshadingPar = 1066;                                                     //11-0574
</PRE>
<PRE>
si_DemHillshadingPar = 1066;                                                  
   // m = Method: 0 = simple; 1 = combined
   // m = Method: 0 = simple; 1 = combined
   // a = azimut
   // a = azimut
  // c = DEM cell size (0=false, 1=true)
   // d = declination
   // d = declination
   // e = exaggeration
   // e = exaggeration
  // i = interpolation mode (INTEGER)
   // l = load hillshading as background map
   // l = load hillshading as background map
si_DemHypsometricMapPar = 1067;                                                   //11-0574
  // r = resolution
   // m = Method: 0 = grayscale; 1 = colored
</PRE>
<PRE>
si_DemHypsometricMapPar = 1067;                                                
   // c = color ramp type [0..2] (INTEGER)
   // l = load hillshading as background map
   // l = load hillshading as background map
si_DemClassifyVegetationPar = 1068;                                               //11-0574
  // w = use white color for elevation 0 (0=false, 1=true)
</PRE>
<PRE>
si_DemClassifyVegetationPar = 1068;                                            
   // m = Method: 0 = grayscale; 1 = colored
   // m = Method: 0 = grayscale; 1 = colored
  // g = Grayscale color ramp: 0 = linear, 1 = quadratic negative, 2 = quadratic positive
   // l = load hillshading as background map
   // l = load hillshading as background map
si_ShapeExportPar = 1069;                                                         //11-0576
</PRE>
<PRE>
si_ShapeExportPar = 1069;                                                      
   // a = item 'area objects' selected (0=false, 1=true)
   // a = item 'area objects' selected (0=false, 1=true)
   // c = create projection file
   // c = create projection file
Line 815: Line 1,371:
   // r = replace word wrap by tilde (0=false, 1=true)
   // r = replace word wrap by tilde (0=false, 1=true)
   // t = item 'text objects' selected (0=false, 1=true)
   // t = item 'text objects' selected (0=false, 1=true)
   // u = UTF-8 Encoding (0=false, 1=true)                                         //11-1014
   // u = UTF-8 Encoding (0=false, 1=true)                                      
si_DxfExportPar = 1070;                                                           //11-0673
</PRE>
<PRE>
si_DxfExportPar = 1070;                                                        
   // a = convert text from ANSI to OEM (0=false, 1=true)
   // a = convert text from ANSI to OEM (0=false, 1=true)
   // o = convert text from OEM to Unicode (0=false, 1=true)
   // o = convert text from OEM to Unicode (0=false, 1=true)
Line 823: Line 1,381:
   // e = export OCAD Curves as DXF splines (0=false, 1=true)
   // e = export OCAD Curves as DXF splines (0=false, 1=true)
   // c = coordinates (0=m, 1=mm)
   // c = coordinates (0=m, 1=mm)
si_DemImportLasPar = 1071;                                                       //11-0854
</PRE>
<PRE>
si_DemImportLasPar = 1071;                                                      
   // u = unclassified
   // u = unclassified
   // g = ground
   // g = ground
Line 833: Line 1,393:
   // o = other class
   // o = other class
   // r = Return option
   // r = Return option
</PRE>
<PRE>
si_MapRoutingPar = 1072;                                                     
  // f = from (0=Location, 1=Coordinate)
  // l = from location
  // e = from easting
  // n = from northing
  // T = to (0=Location, 1=Coordiante)
  // L = to location
  // E = to easting
  // N = to northing
  // d = add driving directions (0=false, 1=true)
</PRE>
<PRE>
si_ServerOfflineBaseObjectList = 1073;
</PRE>
<PRE>
si_SmoothPar = 1074;
  // s = smooth tolerance
  // a = keep vertices if angle change is greater then
  // c = angle change tolerance
  // d = keep vertices if curvature direction changes
</PRE>
<PRE>
si_GeneralizePar = 1075;
  // a = delete vertices if angle change is less than
  // c = angle change tolerance
  // f = area factor (percent)
  // g = generalization type: 0=simplification; 1=rectangle; 2=corner; 3=series
  // i = keep corner vertices
  // j = keep dash vertices
  // n = number of rectangles
  // r = rectangle option: 0=rectangle for each object; 1=one rectangle for all objects; 2=corner; 3=series
  // t = offset tolerance (1/100mm)
</PRE>
<PRE>
si_PolylineToCurvePar = 1076;
  // t = tangent length factor
  // a = keep angle at polyline start/end
  // i = Keep incontinuity if angle change is greater than
  // v = angle incontinuity value
</PRE>
<PRE>
si_IntersectionPar = 1077;
  // a = intersection option (0=insert vertex, 1=cut line, 2=add point object)
  // v = vertex type (0=normal, 1=corner, 2=dash)
  // s = point symbol number
  // t = handle touching points as intersections
</PRE>
<PRE>
si_OcdLasPar = 1078;
  // First = file
  // l = DEM loaded
  // f = Frame visible
</PRE>
<PRE>
si_ThematicMapPar = 1079;
  // First = title
  // a = title color
  // b = title opacity
  // c = title font name
  // d = title font size
  // e = title isBold
  // f = title isItalic
  // g = title alignment
  // h = map height
  // i = Actual theme
  // m = additional information text color
  // n = additional information text opacity
  // p = additional information text font name
  // q = additional information text font size
  // r = additional information text isBold
  // s = additional information text isItalic
  // t = additional information text alignment
  // w = map width
  // x = additional information text
</PRE>
<PRE>
si_ThematicMapLegendPar = 1080;
  // First = EMPTY
  // a = legend title color
  // b = legend title opacity
  // c = legend title font name
  // d = legend title font size
  // e = legend title isBold
  // f = legend title isItalic
  // g = legend title alignment
  // m = legend text color
  // n = legend text opacity
  // p = legend text font name
  // q = legend text font size
  // r = legend text isBold
  // s = legend text isItalic
  // t = legend text alignment
  // v = add theme legend
  // w = add basemap legend
</PRE>
<PRE>
si_ThematicMapScaleBarPar = 1081;
  // First = EMPTY
  // c = scale bar color
  // d = scale bar line width
  // m = scale text color
  // n = scale text opacity
  // p = scale text font name
  // q = scale text font size
  // r = scale text isBold
  // s = scale text isItalic
  // t = scale text alignment
  // v = add scale bar
  // w = add scale text
</PRE>
<PRE>
si_SelectObjectsByDatePar = 1082;
  // c = Creation data checked (boolean: 0=false, 1=true)
  // f = from dataTime (double)
  // t = to dataTime (double)
  // a = All objects  checked (boolean: 0=false, 1=true)
</PRE>
<PRE>
si_DemCreateContourLinesPar = 1083;
  // a = equidistance level 1, multiplyed by 100 (cardinal)
  // b = equidistance level 2, multiplyed by 100 (cardinal)
  // c = equidistance level 3, multiplyed by 100 (cardinal)
  // d = symbol number level 1 (cardinal)
  // e = symbol number level 2 (cardinal)
  // f = symbol number level 3 (cardinal)
</PRE>
</PRE>

Latest revision as of 16:41, 31 August 2016

General

This is a description of the file format of OCAD 12 files.

Be aware that this is an internal format and may change in future versions.

Data types used

OCAD is written in 64-bit Delphi and this description uses the names for the data types as they appear in Delphi. However the same data types are available in other development systems like C++.

Integer 32-bit signed integer
Cardinal 32-bit unsigned integer
SmallInt 16-bit signed integer
Word 16-bit unsigned integer
WordBool 16-bit boolean
String[x]

Widestring. The first byte contains the number of characters followed by the characters. The string is not zero-terminated. The maximum number of characters is x. It occupies x + 1 bytes in the file.

Double 64-bit floating point number
TDPoly A special data type (64-bit) used for all coordinates and text. It is defined as

TDPoly = record
x, y: integer;
end;

The lowest 8 Bits are used to mark special points:

Marks for the x-coordinate:
1: this point is the first bezier curve point
2: this point is the second bezier curve point
4: for double lines: there is no left line between this point and the next point
8: this point is a area border line or a virtual line gap

Marks for y-coordinate:
1: this point is a corner point
2: this point is the first point of a hole in an area
4: for double lines: there is no right line between this point and the next point
8: this point is a dash point

The upper 24 bits contain the coordinate value measured in units of 0.01 mm.

Note: all file positions are in bytes starting from the beginning of the file.

File Header

OCAD files start with a file header.

TFileHeader = record              // size = 60 Byte 
  OCADMark: SmallInt;             // 3245 (hex 0cad)
  FileType: Byte;                 // file type (0: normal map, 1: course setting project, 8: file is saved in Server) 
  FileStatus: Byte;               // not used
  Version: SmallInt;              // 12
  Subversion: Byte;               // number of subversion (0 for 12.0, 1 for 12.1 etc.)
  SubSubversion: Byte;            // number of subsubversion (0 for 12.0.0, 1 for 12.0.1) 
  FirstSymbolIndexBlk: Cardinal;  // file position of the first symbol index block
  ObjectIndexBlock: Cardinal;     // file position of the object index block -> TObjectIndexBlock    // max 65536 * 256 objects 
  OfflineSyncSerial: integer;     // serialNumber for offline work in Server mode
  CurrentFileVersion: integer;    // file version for OCAD version
  Internal: Cardinal;             // 
  Internal: Cardinal;             //
  FirstStringIndexBlk: Cardinal;  // file position of the first string index block
  FileNamePos: Cardinal;          // file position of the file name, used for temporary files only
  FileNameSize: Cardinal;         // size of the file name, used for temporary files only
  Internal: Cardinal;             // 
  Res1: Cardinal;                 // not used
  Res2: Cardinal;                 // not used
  MrStartBlockPosition: Cardinal; // file position of mulitple represention index block

Symbols

Each Symbol Index Block contains the position of the next Symbol Index Block and the file position of 256 symbols.

TSymbolIndexBlock= record        // Size: 1028 Bytes
  NextSymbolIndexBlock: integer;
  SymbolPosition: array[0..255] of integer;
end;

Base Symbol

The different types of symbols are defined in different structures. There is an abstract type TBaseSym, which contains the fields common to all symbols types. It is used for programming reasons, but does not exist in real OCAD files.

TBaseSym = packed record
  Size: integer;                // Size of the symbol in bytes. This  depends on the type. Coordinates following the symbol are included.
  SymNum: integer;              // Symbol number. This is 1000 times the symbol number. 
                                // for example:
                                //   203.145 is stored as 203145
  Otp: byte;                    // Object type
                                //   1: Point symbol
                                //   2: Line symbol or Line text symbol
                                //   3: Area symbol
                                //   4: Text symbol
                                //   6: Line text symbol
                                //   7: Rectangle symbol
  Flags: byte;                  // 1: rotatable symbol (not oriented to north)
                                // 4: belongs to favorites
  Selected: boolean;            // Symbol is selected in the symbol box
  Status: byte;                 // Status of the symbol
                                //   0: Normal
                                //   1: Protected
                                //   2: Hidden
                                // AND 16: selected
  PreferredDrawingTool: byte;   // Preferred drawing tool
                                //   0: off
                                //   1: Curve mode
                                //   2: Ellipse mode
                                //   3: Circle mode
                                //   4: Rectangular line mode
                                //   5: Rectangular area mode
                                //   6: Straight line mode
                                //   7: Freehand mode
                                //   8: Numeric mode
                                //   9: Stairway mode                          
  CsMode: byte;                 // Course setting mode
                                //   0: not used for course setting
                                //   1: course symbol
                                //   2: control description symbol
  CsObjType: byte;              // Course setting object type
                                //   0: Start symbol (Point symbol)
                                //   1: Control symbol (Point symbol)
                                //   2: Finish symbol (Point symbol)
                                //   3: Marked route (Line symbol)
                                //   4: Control description symbol (Point symbol)
                                //   5: Course title (Text symbol)
                                //   6: Start number (Text symbol)
                                //   7: Relay variant (Text symbol)
                                //   8: Text block for control description (Text symbol)
  CsCdFlags: byte;              // Course setting control description flags
                                //   a combination of the flags
                                //   64: available in column B
                                //   32: available in column C
                                //   16: available in column D
                                //   8: available in column E
                                //   4: available in column F
                                //   2: available in column G
                                //   1: available in column H
  Extent: integer;              // Extent how much the rendered symbols can reach outside the coordinates of an object with
                                // this symbol. For a point object it tells how far away from the coordinates of the object
                                // anything of the point symbol can appear
  FilePos: cardinal;            // Used internally. Value in the file is not defined.
  notUsed1: Byte;            
  notUsed2: Byte;            
  nColors: SmallInt;            // Number of colors of the symbol max. 14, -1: the number of colors is > 14
  Colors: array[0..13] of SmallInt; // Colors of the symbol
  Description: array[0..63] of char;// Description text                        
  IconBits: array[0..483] of byte;  // Each byte represents a pixel of the icon in a 256 color palette
  SymbolTreeGroup: Array[0..63] of Word; // Group ID in the symbol tree, max 64 symbol groups 

Point Symbol

Point symbols are stored with this structure:

TPointSym = packed record
  Size: integer;                         // see TBaseSym
  SymNum: integer;                       // see TBaseSym
  Otp: byte;                             // 1
  Flags: byte;                           // see TBaseSym
  Selected: boolean;                     // see TBaseSym
  Status: byte;                          // see TBaseSym
  PreferredDrawingTool: byte;            // see TBaseSym
  CsMode: byte;                          // see TBaseSym
  CsObjType: byte;                       // see TBaseSym
  CsCDFlags: byte;                       // see TBaseSym
  Extent: integer;                       // see TBaseSym
  FilePos: cardinal;                     // see TBaseSym
  notUsed1: Byte;            
  notUsed2: Byte;            
  nColors: SmallInt;                     // see TBaseSym
  Colors: array[0..13] of SmallInt;      // see TBaseSym
  Description: array[0..63] of char;     // see TBaseSym
  IconBits: array[0..483] of byte;       // see TBaseSym
  SymbolTreeGroup: Array[0..63] of Word; // see TBaseSym
  DataSize: word;                        // number of coordinates (each 8 bytes) which follow this structure, each object header
                                         // counts as 2 Coordinates (16 bytes)
  Reserved: SmallInt;
end;


After this structure follow the symbol elements which build that Point symbol. These symbol elements are stored in the following structure. Note that these symbol elements are stored in a different way than ordinary map objects.

TSymElt = record
  stType: SmallInt;                   // type of the symbol element
                                      //   1: line
                                      //   2: area
                                      //   3: circle
                                      //   4: dot (filled circle)
  stFlags: word;                      // Flags
                                      //   1: line with round ends
  stColor: SmallInt;                  // color of the object. This is the number which appears in
                                      // the colors dialog box
  stLineWidth: SmallInt;              // line width for lines and circles unit 0.01 mm
  stDiameter: SmallInt;               // Diameter for circles and dots. The line width is included
                                      // one time in this dimension for circles.
  stnPoly: SmallInt;                  // number of coordinates
  stRes1: SmallInt;                   // Not used
  stRes2: SmallInt;                   // Not used
  stPoly: array[0..32767] of TPoint;  // coordinates of the symbol element
end;

If there are several objects, they just follow each other (only the coordinates used are stored). To determine the number of objects the DataSize variable must be used.

Line Symbol

Line symbols are stored in the following structure. In the explanation the terms used in the Line Symbol dialog box are shown.

TLineSym = packed record
  Size: integer;                         // see TBaseSym
  SymNum: integer;                       // see TBaseSym
  Otp: byte;                             // 2
  Flags: byte;                           // see TBaseSym
  Selected: boolean;                     // see TBaseSym
  Status: byte;                          // see TBaseSym
  PreferredDrawingTool: byte;            // see TBaseSym
  CsMode: byte;                          // see TBaseSym
  CsObjType: byte;                       // see TBaseSym
  CsCDFlags: byte;                       // see TBaseSym
  Extent: integer;                       // see TBaseSym
  FilePos: cardinal;                     // see TBaseSym
  notUsed1: Byte;            
  notUsed2: Byte;            
  nColors: SmallInt;                     // see TBaseSym
  Colors: array[0..13] of SmallInt;      // see TBaseSym
  Description: array[0..63] of char;     // see TBaseSym
  IconBits: array[0..483] of byte;       // see TBaseSym
  SymbolTreeGroup: Array[0..63] of Word; // see TBaseSym
  LineColor: SmallInt;                   // Line color
  LineWidth: SmallInt;                   // Line width
  LineStyle: SmallInt;                   // Line style
                                         //   0: bevel joins/flat caps
                                         //   1: round joins/round caps
                                         //   4: miter joins/flat caps
  DistFromStart: SmallInt;               // Distance from start
  DistToEnd: SmallInt;                   // Distance to the end
  MainLength: SmallInt;                  // Main length a
  EndLength: SmallInt;                   // End length b
  MainGap: SmallInt;                     // Main gap C
  SecGap: SmallInt;                      // Gap D
  EndGap: SmallInt;                      // Gap E
  MinSym: SmallInt;                      // -1: at least 0 gaps/symbols
                                         //  0: at least 1 gap/symbol
                                         //  1: at least 2 gaps/symbols
                                         //  etc.
  nPrimSym: SmallInt;                    // No. of symbols
  PrimSymDist: SmallInt;                 // Distance
  DblMode: word;                         // Mode (Double line page)
  DblFlags: word;                        // Double line flags
                                         //    1: Fill color on
                                         //    2: Background color on
  DblFillColor: SmallInt;                // Fill color
  DblLeftColor: SmallInt;                // Left line/Color
  DblRightColor: SmallInt;               // Right line/Color
  DblWidth: SmallInt;                    // Width
  DblLeftWidth: SmallInt;                // Left line/Line width
  DblRightWidth: SmallInt;               // Right line/Line width
  DblLength: SmallInt;                   // Dashed/Distance a
  DblGap: SmallInt;                      // Dashed/Gap
  DblBackgroundColor: SmallInt;          // Reserved
  DblRes: array[0..1] of SmallInt;       // Reserved
  DecMode: word;                         // Decrease mode
                                         //   0: off
                                         //   1: decreasing towards the end
                                         //   2: decreasing towards both ends
                                         //   3: decreasing towards first symbol of line
  DecSymbolSize: SmallInt;               // Last symbol size 
  DecSymbolDistance: boolean;            // Option to disable decreasing symbol distance
  DecSymbolWidth: boolean;               // Option to decrease symbol width (of line, circle, area elements) 
  FrColor: SmallInt;                     // Color of the framing line
  FrWidth: SmallInt;                     // Line width of the framing line
  FrStyle: SmallInt;                     // Line style of the framing line
                                         //   0: bevel joins/flat caps
                                         //   1: round joins/round caps
                                         //   4: miter joins/flat caps
                                         //  PointedEnd := LineStyle and 2 > 0;
  PrimDSize: word;                       // number or coordinates (8 bytes) for the Main symbol A which follow this structure.
                                         // Each symbol header counts as 2 coordinates (16 bytes).
  SecDSize: word;                        // number or coordinates (8 bytes) for the Secondary symbol which follow the Main symbol A
                                         // Each symbol header counts as 2 coordinates (16 bytes).
  CornerDSize: word;                     // number or coordinates (8 bytes) for the Corner symbol which follow the Secondary symbol
                                         // Each symbol header counts as 2 coordinates (16 bytes).
  StartDSize: word;                      // number or coordinates (8 bytes) for the Start symbol C which follow the Corner symbol
                                         // Each symbol header counts as 2 coordinates (16 bytes).
  EndDSize: word;                        // number or coordinates (8 bytes) for the End symbol D which follow the Start symbol C
                                         // Each symbol header counts as 2 coordinates (16 bytes).
  UseSymbolFlags: Byte;                  // 1 = end symbol, 2 = start symbol, 4 = corner symbol, 8 = secondary symbol   
  Reserved: Byte;
end;

Area Symbol

Area symbols are stored in the following structure. In the explanation the terms used in the Area Symbol dialog box are shown. The unit of all dimensions is 0.01 mm.

TAreaSym = packed record
  Size: integer;                         // see TBaseSym
  SymNum: integer;                       // see TBaseSym
  Otp: byte;                             // 3
  Flags: byte;                           // see TBaseSym
  Selected: boolean;                     // see TBaseSym
  Status: byte;                          // see TBaseSym
  PreferredDrawingTool: byte;            // see TBaseSym
  CsMode: byte;                          // see TBaseSym
  CsObjType: byte;                       // see TBaseSym
  CsCDFlags: byte;                       // see TBaseSym
  Extent: integer;                       // see TBaseSym
  FilePos: cardinal;                     // see TBaseSym
  notUsed1: Byte;            
  notUsed2: Byte;            
  nColors: SmallInt;                     // see TBaseSym
  Colors: array[0..13] of SmallInt;      // see TBaseSym
  Description: array[0..63] of char;     // see TBaseSym
  IconBits: array[0..483] of byte;       // see TBaseSym
  SymbolTreeGroup: Array[0..63] of Word; // see TBaseSym
  BorderSym: integer;                    // Symbol for border line  activated if BorderOn is true
  FillColor: SmallInt;                   // Fill color activated if FillOn is true
  HatchMode: SmallInt;                   // Hatch mode
                                         //   0: None
                                         //   1: Single hatch
                                         //   2: Cross hatch
  HatchColor: SmallInt;                  // Color (Hatch page)
  HatchLineWidth: SmallInt;              // Line width
  HatchDist: SmallInt;                   // Distance
  HatchAngle1: SmallInt;                 // Angle 1
  HatchAngle2: SmallInt;                 // Angle 2
  FillOn: boolean;                       // Fill is activated
  BorderOn: boolean;                     // Border line is activated
  StructMode: byte;                      // Structure
                                         //   0: None
                                         //   1: aligned rows
                                         //   2: shifted rows
  StructDraw: byte;                      // Structure Drawing type                      
                                         // 0: Clip (until OCAD 11)
                                         // 1: draw elements completely inside area
                                         // 2: draw elements with center inside area
                                         // 3: draw elements partially inside area
  StructWidth: SmallInt;                 // Width
  StructHeight: SmallInt;                // Height
  StructAngle: SmallInt;                 // Angle
  StructIrregularVarX: byte;             // Horizontal variation in percent from StructWidth 
  StructIrregularVarY: byte;             // Vertical variation in percent from StructHeight
  StructIrregularMinDist: SmallInt;      // Minimum distance between irregular symbols
  StructRes: SmallInt;                   // Reserved
  DataSize: word;                        // number of coordinates (each 8 bytes) which follow this structure, each object header
                                         // counts as 2 Coordinates (16 bytes)
end;

Text Symbol

Text symbols are stored in the following structure. In the explanation the terms used in the Text Symbol dialog box are shown. The unit of all dimensions is 0.01 mm, except for the font sizes which are measured in 0.1 typographical points.

TTextSym = packed record
  Size: integer;                         // see TBaseSym
  SymNum: integer;                       // see TBaseSym
  Otp: byte;                             // 4
  Flags: byte;                           // see TBaseSym
  Selected: boolean;                     // see TBaseSym
  Status: byte;                          // see TBaseSym
  PreferredDrawingTool: byte;            // see TBaseSym
  CsMode: byte;                          // see TBaseSym
  CsObjType: byte;                       // see TBaseSym
  CsCDFlags: byte;                       // see TBaseSym
  Extent: integer;                       // see TBaseSym
  FilePos: cardinal;                     // see TBaseSym
  notUsed1: Byte;            
  notUsed2: Byte;            
  nColors: SmallInt;                     // see TBaseSym
  Colors: array[0..13] of SmallInt;      // see TBaseSym
  Description: array[0..63] of char;     // see TBaseSym
  IconBits: array[0..483] of byte;       // see TBaseSym
  SymbolTreeGroup: Array[0..63] of Word; // see TBaseSym
  FontName: string[31];                  // TrueType font
  FontColor: SmallInt;                   // Color
  FontSize: SmallInt;                    // 10 times the size in pt
  Weight: SmallInt;                      // Bold as used in the Windows GDI
                                         //   400: normal
                                         //   700: bold
  Italic: boolean;                       // true if Italic is checked
  Res1: byte;                            // not used
  CharSpace: SmallInt;                   // Char. spacing
  WordSpace: SmallInt;                   // Word spacing
  Alignment: SmallInt;                   // Alignment
                                         //   0: Bottom Left
                                         //   1: Bottom Center
                                         //   2: Bottom Right
                                         //   3: Bottom Justified
                                         //   4: Middle Left 
                                         //   5: Middle Center 
                                         //   6: Middle Right
                                         //   7: only in LText!
                                         //   8: Top Left
                                         //   9: Top Center
                                         //  10: Top Right
                                         //  11: only in LText!
  LineSpace: SmallInt;                   // Line spacing
  ParaSpace: SmallInt;                   // Space after Paragraph
  IndentFirst: SmallInt;                 // Indent first line
  IndentOther: SmallInt;                 // Indent other lines
  nTabs: SmallInt;                       // number of tabulators for text symbol
  Tabs: array[0..31] of longint;         // Tabulators
  LBOn: wordbool;                        // true if Line below On is checked
  LBColor: SmallInt;                     // Line color (Line below)
  LBWidth: SmallInt;                     // Line width (Line below)
  LBDist: SmallInt;                      // Distance from text
  Res2: SmallInt;
  FrMode: byte;                          // Framing mode
                                         //   0: no framing
                                         //   1: shadow framing
                                         //   2: line framing
                                         //   3: rectangle framing
  FrLineStyle: byte;                     // Framing line style
                                         //   0: default OCAD 8 Miter
                                         //   2: ps_Join_Bevel
                                         //   1: ps_Join_Round
                                         //   4: ps_Join_Miter
  PointSymOn: boolean;                   // Point symbol is activated
  PointSymNumber: integer;               // Point symbol for text symbol activated if PointSymOn is true
  Res3: string[18];                      // not used
  FrLeft: SmallInt;                      // Left border for rectangle framing
  FrBottom: SmallInt;                    // Bottom border for rectangle framing
  FrRight: SmallInt;                     // Right border for rectangle framing
  FrTop: SmallInt;                       // Top border for rectangle framing
  FrColor: SmallInt;                     // Framing color
  FrWidth: SmallInt;                     // Framing width for line framing
  Res4: SmallInt;                        // not used
  Res5: wordbool;                        // not used
  FrOfX: SmallInt;                       // Horizontal offset for shadow framing
  FrOfY: SmallInt;                       // Vertical offset for shadow framing
end;

Line Text Symbol

Line Text symbols are stored in the following structure. In the explanation the terms used in the Line Text Symbol dialog box are shown. The unit of all dimensions is 0.01 mm, except for the font sizes which are measured in 0.1 typographical points.

TLTextSym = packed record
  Size: integer;                         // see TBaseSym
  SymNum: integer;                       // see TBaseSym
  Otp: byte;                             // 6
  Flags: byte;                           // see TBaseSym
  Selected: boolean;                     // see TBaseSym
  Status: byte;                          // see TBaseSym
  PreferredDrawingTool: byte;            // see TBaseSym
  CsMode: byte;                          // see TBaseSym
  CsObjType: byte;                       // see TBaseSym
  CsCDFlags: byte;                       // see TBaseSym
  Extent: integer;                       // see TBaseSym
  FilePos: cardinal;                      // see TBaseSym
  notUsed1: Byte;            
  notUsed2: Byte;            
  nColors: SmallInt;                     // see TBaseSym
  Colors: array[0..13] of SmallInt;      // see TBaseSym
  Description: array[0..63] of char;     // see TBaseSym
  IconBits: array[0..483] of byte;       // see TBaseSym
  SymbolTreeGroup: Array[0..63] of Word; // see TBaseSym
  FontName: string[31];                  // TrueType font
  FontColor: SmallInt;                   // Color
  FontSize: SmallInt;                    // 10 times the value entered in Size
  Weight: SmallInt;                      // Bold as used in the Windows GDI
                                         //   400: normal
                                         //   700: bold
  Italic: boolean;                       // true if Italic is checked
  Res1: byte;                            // not used
  CharSpace: SmallInt;                   // Char. spacing
  WordSpace: SmallInt;                   // Word spacing
  Alignment: SmallInt;                   // Alignment     
                                         //   0: Bottom Left
                                         //   1: Bottom Center
                                         //   2: Bottom Right
                                         //   3: Bottom All line
                                         //   4: Middle Left
                                         //   5: Middle Center
                                         //   6: Middle Right
                                         //   7: Middle All line
                                         //   8: Top Left
                                         //   9: Top Center
                                         //  10: Top Right
                                         //  11: Top All line 
  FrMode: byte;                          // Framing mode
                                         //   0: no framing
                                         //   1: shadow framing
                                         //   2: line framing
  FrLineStyle: byte;                     // Framing line style
                                         //   0: default OCAD 8 and 9.0 Miter
                                         //   2: ps_Join_Bevel
                                         //   1: ps_Join_Round
                                         //   4: ps_Join_Miter
  Res2: string[31];                      // not used
  FrColor: SmallInt;                     // Framing color
  FrWidth: SmallInt;                     // Framing width for line framing
  Res3: SmallInt;                        // not used
  Res4: wordbool;                        // not used
  FrOfX: SmallInt;                       // Horizontal offset for shadow framing
  FrOfY: SmallInt;                       // Vertical offset for shadow framing
end;

Rectangle Symbol

Rectangle symbols are stored in the following structure. In the explanation the terms used in the Rectangle Symbol dialog box are shown. The unit of all dimensions is 0.01 mm.

TRectSym = packed record
  Size: integer;                         // see TBaseSym
  SymNum: integer;                       // see TBaseSym
  Otp: byte;                             // 7
  Flags: byte;                           // see TBaseSym
  Selected: boolean;                     // see TBaseSym
  Status: byte;                          // see TBaseSym
  PreferredDrawingTool: byte;            // see TBaseSym
  CsMode: byte;                          // see TBaseSym
  CsObjType: byte;                       // see TBaseSym
  CsCDFlags: byte;                       // see TBaseSym
  Extent: integer;                       // see TBaseSym
  FilePos: cardinal;                      // see TBaseSym
  notUsed1: Byte;            
  notUsed2: Byte;            
  nColors: SmallInt;                     // see TBaseSym
  Colors: array[0..13] of SmallInt;      // see TBaseSym
  Description: array[0..63] of char;     // see TBaseSym
  IconBits: array[0..483] of byte;       // see TBaseSym
  SymbolTreeGroup: Array[0..63] of Word; // see TBaseSym
  LineColor: SmallInt;                   // Line color
  LineWidth: SmallInt;                   // Line width
  Radius: SmallInt;                      // Corner radius
  GridFlags: word;                       // A combination of the flags
                                         //   1: Grid On
                                         //   2: Numbered from the bottom
  CellWidth: SmallInt;                   // Cell width
  CellHeight: SmallInt;                  // Cell height
  ResGridLineColor: SmallInt;            // Reserved
  ResGridLineWidth: SmallInt;            // Reserved
  UnnumCells: SmallInt;                  // Unnumbered Cells
  UnnumText: string[3];                  // Text in unnumbered Cells
  LineStyle: SmallInt;                   // Line style
                                         //   1: flat caps
                                         //   0: round caps
                                         //   4: flat caps
  Res2: string[31];                      // not used
  ResFontColor: SmallInt;                // Reserved
  FontSize: SmallInt;                    // font size
  Res3: SmallInt;                        // not used
  Res4: wordbool;                        // not used
  Res5: SmallInt;                        // not used
  Res6: SmallInt;                        // not used
end;

Objects

Each Object Index Block contains the position of the next Object Index Block and the file position and other information of 256 objects.

Object Index Block

TObjectIndexBlock = record   // Size: 10296 Bytes
  NextObjectIndexBlock: integer;
  Table: array[0..255] of TObjectIndex;
end;

OCAD Object Index

TObjectIndex = packed record // Size: 40 Byte
  rc: LRect;                 // bounding box (lower left and upper right)
  Pos: integer;              // file position of the object -> TOcadObject
  Len: integer;              // number of coordinate pairs, the size of the object in the file is then calculated by: 32 + 8*Len
                             // Note: this is reserved space in the file, the effective length of the object may be shorter
  Sym: integer;              // -4 = layout vector object                     
                             // -3 = image object, imported from DTP formats (eg AI, PDF, SVG)
                             // -2 = graphic object
                             // -1 = imported, no symbol assigned or symbol number
  ObjType: byte;             // 1 = Point object
                             // 2 = Line object
                             // 3 = Area object
                             // 4 = Unformatted text
                             // 5 = Formatted text
                             // 6 = Line text
                             // 7 = Rectangle object
  EncryptedMode: byte;       // 0 = normal                                    
                             // 1 = encoded object (TOcadObject)
  Status: byte;              // 0 = deleted (not undo) (eg from symbol editor or course setting)
                             // 1 = normal
                             // 2 = hidden
                             // 3 = deleted for undo
  ViewType: byte;            // 0 = normal object
                             // 1 = course setting object
                             // 2 = modified preview object
                             // 3 = unmodified preview object
                             // 4 = temporary object (symbol editor or control description)
  Color: SmallInt;           // Color number for graphic objects, -1 for image or layout objects
  Group: SmallInt;           // Group number of grouped objects               
  ImpLayer: SmallInt;        // Layer number of imported objects, 0 means no layer number
  DbDatasetHash: byte;       // Internal use        
  DbKeyHash: byte;           // Internal use
end;

OCAD Object

TOcadObject = packed record         //
  Sym: Integer;                     // >0 = symbol number
                                    // -4 = layout vector object               
                                    // -3 = from PDF, AI
                                    // -2 = graphic object
                                    // -1 = imported, no symbol assigned or symbol number
  Otp: Byte;                        // object typ
  _Customer: Byte;                  // 
  Ang: SmallInt;                    // Angle, unit is 0.1 degrees, used for
                                    // - point object
                                    // - area objects with structure
                                    // - unformatted text objects
                                    // - rectangle objects
  Col: integer;                     // Color number for graphic objects, color value for image or layout objects
  LineWidth: SmallInt;              // Line width for graphic, image and layout objects
  DiamFlags: SmallInt;              // Line style for graphic objects
  ServerObjectId: Integer;          // added for server objects                
  Height: Integer;                  // Height [1/256 mm]                      
  CreationDate: Double              // creation date
  MultirepresentationId: Cardinal;  // id references to the main object        
  ModificationDate: Double          // modification date                           
  nItem: Cardinal;                  // number of coordinates in the Poly array
  nText: Word;                      // number of characters in the Poly, array used for storing text for line text objects and text objects
                                    // for all other objects it is 0
  nObjectString: Word;              // length of object string
  nDatabaseString: Word;            // length of database link
  ObjectStringType: Byte;           // type of object string in Poly array 
                                    // None = 0
                                    // Coures setting object = 1  
                                    // Coures setting preview object = 2  
                                    // Coures setting layout object = 3  
                                    // Coures setting thematic object = 4  
  Res1: Byte;                       // not used                       
  Poly: TDPoly;                     // array[0..] coordinates of the object followed by a zero-terminated string
                                    // if nText > 0 TCord is explained at the beginning of this description
end;

Parameter Strings

The Parameter Strings contain all the information about the setup structure, background maps,course setting and database connection.

Similar to the symbols and objects there are String Index Blocks which contain the basic information for 256 Parameter Strings and the file position of the strings.

TStringIndexBlock contains the basic information for 256 strings

TStringIndexBlock = record
  NextIndexBlock: integer;            // file position of the next StringIndexBlock, 0 if this is the last StringIndexBlock
  Table: array[0..255] of TStringIndex;
end;

TStIndex contains the basic information for 1 string:

TStringIndex = packed record
  Pos: integer;                       // file position of string
  Len: integer;                       // length reversed for the string
  RecType: integer;                   // string typ number, if < 0 then deleted string
  ObjIndex: integer;                  // index of the object
end;

StringIndexBlk in the FileHeader points to the first StringIndexBlock.

The strings (null terminated) have the following structure:

  • first field: all characters until the first tab (character 9). The first field can be missing (the string starts with a tab).
  • tab (character 9)
  • code: this is the first character after the tab
  • value: all characters until the next tab
  • tab
  • code
  • value
  • ...

Some of String Types (number < 1000) may have multiple instances of the same type. They have to be stored as lists.

si_Course = 2;
  // First = CourseName
  // C = Climb
  // E = Extra distance
  // F = from start number (auto created class)
  // H = ClassName for control description (imported from event software)       
  // K = Combination (imported from event software)                         
  // M = Map file
  // R = number of runners/teams (auto created class)
  // S = Map scale
  // T = to start number (auto created class)
  // Y = Course type (s = relay, o = one-man relay)
  // L = Number of Legs (used for relay and one-man relay)
  // s = start
  // c = control
  // m = marked route
  // k = mandatory crossing point
  // w = mandatory passage through out of bounds area
  // g = map change
  // f = finish
  // l = leg variation starts
  // b = branch of a leg variation starts
  // p = end of a leg variation
  // r = relay variation starts
  // v = branch of a relay variation starts
  // q = end of a relay variation
  // e = used internally only (control number)
  // i = used internally only (back to begin of variation)
  // j = used internally only (line to end of variation)
  // n = course name object
  // u = start number object
  // t = text block for control description
  // o = other object
si_CsClass = 3;
  // First = class name
  // c = Course name
  // f = FromNumber (relay)
  // r = Number of runners
  // t = ToNumber (relay)
si_DataSet = 4;
  // First = dataset name
  // e = dBase file
  // d = ODBC data source
  // u = database user name (encrypted)                                    
  // p = database password (encrypted)                                            
  // t = table
  // k = key field
  // r = secondary table, reference key
  // s = secondary table, table key
  // m = secondary table, key
  // y = symbol field
  // b = Assign new symbol when changing field value [boolean, false]        
  // x = text field
  // f = size field
  // l = length unit
  // a = area unit
  // c = decimals
  // h = easting field
  // v = northing field
  // g = angle field  
  // j = date field                                                          
si_OimFile = 6;
si_BackgroundMap = 8;
  // First = file name
  // a = angle omega [double, 8]
  // b = angle phi [double, 8]
  // d = dim
  // o = render with spot colors (only for raster background maps)
  // p = assigned to spot color (only for raster background maps)
  // q = subtract from spot color (0 = normal, 1 = subtract)
  // r = visible in background favorites (0 = hidden, 1 = visible)
  // s = visible in normal, spot color and draft mode (0 = hidden, 1 = visible)
  // t = transparent
  // x = offset x [double, 6]
  // y = offset y [double, 6]
  // u = pixel size x [double, 10]
  // v = pixel size y [double, 10]
  // i = is infrared image (0=undefined, 1=32bit-infrared, 2=32bit RGB)           
  // m = is WMS online background map                                             
  // k = WMS server name                                                          
  // l = WMS layer name                                                          
  // n = WMS layer scale range                                   
si_Color = 9;
  // First = name
  // n = number
  // c = cyan
  // m = magenta
  // y = yellow
  // k = black
  // o = overprint
  // t = transparency
  // s = spot color separation name
  // p = percentage in the spot color separation
si_SpotColor = 10;
  // First = name
  // v = visible
  // n = number
  // f = frequency (lpi)
  // a = angle
  // c = cyan
  // m = magenta
  // y = yellow
  // k = black
si_Zoom = 12;
  // x = offset x
  // y = offset y
  // z = zoom
si_ImpLayer = 13;
  // First = Name
  // n = layer number
si_OimFind = 14;
  // First = Name
  // c = Condition
  // d = Dataset
  // f = From zoom
  // h = Hint field
  // n = Name field
  // o = Hotspot type
  // p = Pointer type
  // s = Show hotspots
  // l = List names(in listbox)
  // t = To zoom
  // u = URL field
  // x = Prefix
  // y = Postfix
  // z = Target
  // r = Pointer color red
  // g = Pointer color green
  // b = Pointer color blue
  // R = Hotspot color red
  // G = Hotspot color green
  // B = Hotspot color blue
si_SymTree = 15;
  // First = name 
  // g = group id 
  // v = visible
  // e = is node expanded (boolean)                                               
  // i = Level in Tree                                                            
si_Bookmark = 18;                                                              
  // First = bookmark name
  // d = description
  // x = offset x
  // y = offset y
  // z = zoom
si_Selection = 19;                                                              
  // First = selection name
  // n = number
  // o = object ids
si_Group = 23;                                                          
  // First = Name
  // n = group number
si_RecentDocs = 24;                                                              
  // First = file name
si_CsAutoCdAllocationTable = 25;                                                
  // First = Map symbol number (STRING)
  // a = Control description symbol 0 (STRING)
  // b = Control description symbol 1 (STRING)
  // c = Control description symbol 2 (STRING)
  // d = Control description symbol 3 (STRING)
  // e = Control description symbol 4 (STRING)
  // f = Control description symbol 5 (STRING)
  // g = Control description dragged direction (STRING)
  // h = Control description click (STRING)
si_RulerGuidesList = 26;                                                         
  // h = horizontal guide (0=vertical, 1=horizontal)
  // c = x or y ccordiante (INTEGER, OCAD coordinate)
si_LayoutObjects = 27;                                                          
  // First = path for images; description for vector objects
  // r = type: raster image object = 1; vector object = 0
  // s = visible (0 = hidden, 1 = visible)
  // a = angle omega
  // b = angle phi
  // d = dim
  // t = transparent
  // x = offset x
  // y = offset y
  // u = pixel size x
  // v = pixel size y
  // i = is infrared image (0=undefined, 1=32bit-infrared, 2=32bit RGB)          
  // n = ObjectIndex
si_PrintAndExportRectangleList = 29;                                           
  // First = Name
  // b = bottom [integer, ocad unit]
  // l = left [integer, ocad unit]
  // r = right [integer, ocad unit]
  // t = top [integer, ocad unit]
si_DisplayPar = 1024;
  // f = Show symbol favorites
  // g = selected symbol group
  // s = selected symbol
  // t = Show symbol tree
  // h = horizontal splitter (pixel from top)                                    
  // v = vertical splitter (pixel from right)                                     
  // b = horizontal splitter for background map panel (pixel from top)           
  // i = display mode for unsymbolized objects (0=normal, 2=hidden)             
  // j = display mode for graphic objects (0=normal, 2=hidden)                    
  // k = display mode for image objects (0=normal, 1=protect, 2=hidden) 
  // l = display mode for layout objects (0=normal, 2=hidden)                    
si_DemClassifyVegetationClassList = 30;                                           //11-1112
  // First = Name
  // a = fromHeight100
  // b = toHeight100
  // c = fromColorCyan
  // d = fromColorMagenta
  // e = fromColorYellow
  // f = fromColorBlack
  // g = toColorCyan
  // h = toColorMagenta
  // i = toColorYellow
  // j = toColorBlack
si_CsTextBlock = 31;
si_ThematicMapThemes = 32;                                                        //12-0192
si_ThematicMapVisualizationProperties = 33;                                       //12-0192
si_ThematicMapObjects = 34;                                                       //12-0192
si_Layers = 35;                                                                   //12-0192
si_SymbolStatusManager = 36;
  // First = Name
  // s = status string
si_MrBoundRects = 50;
si_MrProjectMatrix = 51;
si_MrOptions = 52;
si_DisplayPar = 1024;
  // f = Show symbol favorites
  // g = selected symbol group
  // s = selected symbol
  // t = Show symbol tree
  // h = horizontal splitter (pixel from top)                                  
  // v = vertical splitter (pixel from right)                                    
  // b = horizontal splitter for background map panel (pixel from top)          
  // i = display mode for unsymbolized objects (0=normal, 2=hidden)             
  // j = display mode for graphic objects (0=normal, 2=hidden)                   
  // k = display mode for image objects (0=normal, 1=protect, 2=hidden) 
  // l = display mode for layout objects (0=normal, 2=hidden)            
si_OimPar = 1025;
  // First = OpenLayers
  // a = Anti-Aliasing  [boolean]                                                 
  // b = Border width [integer]
  // A = Map title [string]
  // C = Map subtitle [string]
  // D = Base layer name [string]
  // E = Editlayer enable [boolean]
  // F = Searchbox enable [boolean]
  // s = Search/listbox with selection [boolean]
  // m = Do not create tiles [boolean]
  // H = Show layer selector [boolean]
  // I = Show overview map [boolean]
  // i = Show overview map maximized [ boolean]
  // K = Show mouse coordinates [boolean]
  // P = Show Permalink [boolean]
  // J = Font size in pt [integer]
  // L = Subheader fontsize in pt [integer]
  // R = Site background color red [integer: 0..255]
  // G = Site background color green [integer: 0..255]
  // B = Site background color blue  [integer: 0..255]
  // M = Border color [string] as hex e.g.: 00FF00 must be exact 6 values
  // N = Header font color [string] as hex exapmle see border color
  // O = Header background color [string] as hex
  // T = Subheader font color [string] as hex
  // Q = Subheader background color [string] as hex
  // X = Filename of last Safeplace [string]
  // f = Generate map from zoomlevel [integer]                                   
  // t = Generate map to zoomlevel [integer]
si_PrintPar = 1026;
  // a = print scale
  // l = landscape
  // c = print (0 = color map, 1 = spot color separation)
  // g = print screen grid
  // d = screen grid color
  // i = intensity
  // w = additional width for lines and dots
  // r = Range (0 entire map, 1 part of map, 2 one page)
  // L = part of map left
  // B = part of map bottom
  // R = part of map right
  // T = part of map top
  // x = horizontal overlap
  // y = vertical overlap
  // b = print black   (course setting only)
  // m = Mirror        (course setting only)
  // s = HorScal       (course setting only)
  // t = VerScal       (course setting only)
  // p = reference point for part of map setup ([0..8])                         
si_CdPrintPar = 1027;
  // s = Size
si_DefaultBackgroundMapsPar = 1028;                                             
  // s = default scale
si_EpsPar = 1029;
  // r = EPS resolution
si_ViewPar = 1030;
  // b = draft mode IGN for ocad-map [int: 0..100]
  // c = draft mode IGN background maps [int: 0..100]
  // d = hidden background maps
  // m = draft mode for ocad-map [int: 0..100]
  // t = draft mode background maps [int: 0..100]
  // v = view mode (0=normal, 1=spot colors, 2=draft, 3=draft IGN)
  // x = offset x
  // y = offset y
  // z = zoom
  // h = hatch areas (0 = normal, 1 = hatched)
  // k = keyline mode (0 = normal, 1 = keyline)                                  
  // i = map visible                                                             
  // l = hidden layout
  // OLD: a, p, s
si_CoursePar = 1031;
  // a = create classes automatically
  // b = background for control description
  // B = draw white background also in draft mode (BOOL)
  // c = numbering (0 = number, 1 = number and code, 2 = code only)
  // d = control descriptions for all controls
  // e = event title
  // f = control frequencies (0 = number and frequencies, 1 = frequencies only)
  // h = thicker horizonal line in control description (0=not, 1=every third, 2=every fourth)
  // i = maximal length of control description (number of rows)
  // l = distance to connection line
  // n = distance to number
  // o = lock for cs object positions (0=unlocked, 1=locked) (BOOL)              
  // p = fullstop after control number (BOOL)                                          
  // q = lock for cs courses (0=unlocked, 1=locked) (BOOL)                       
  // r = export relay combinations
  // s = cell size control description
  // t = course title
  // u = punching system (0=SportIdent, 1=Emit, 2=other) (Integer)
  // w = write number of start to control description (BOOL)                            
si_TiffPar = 1032;
  // c = compression (1 = no compression, 2 = CCITT, 4 = FaxG4, 5 = LZW)
si_TilesPar = 1033;
  // w = width
  // h = height
si_DbPar = 1034;
  // d = dataset
  // l = last code
  // n = create new record
si_ExportPar = 1035;
  // First = Format (AI, BMP, DXF, GIF, JPEG, OIM, PDF, Shape, SVG, TIFF)
  // a = Anti-Aliasing
  // b = combined spot colors
  // c = color format (0 = 24 bit, 1 = 256 colors, 2 = grayscale, 3 = 1 bit, 4 = halftone screen)    
  // g = Raster (geo-referenced)export mode 0 = resolution, 1 = pixel size      
  // i = pixel size (in Meter)                                                  
  // l = color correction (0 off, 1 on)
  // o = spot color separations (0=CMYK, 1=spot colors)
  // p = part of map (0 off, 1 on)
  // q = JPEG quality (INTEGER, [0..100])                                         
  // r = resolution
  // s = scale
  // t = tiles (0 off, 1 on)
  // w = world file                                                              
  // z = compressed svg file (0 off, 1 on)
si_CsExpTextPar = 1037;
  // C = classes (0 = courses, 1 = classes)
  // L = export climbing (0 = off, 1 = on)
si_CsExpStatPar = 1038;
  // C = classes (0 = courses, 1 = classes)
  // a = separator 1
  // b = tab 1
  // c = separator 2
  // d = tab 2
  // e = separator 3
  // f = tab 3
si_ScalePar = 1039;
  // a = real world angle
  // b = additional local easting offset in m                                 
  // c = additional local northing offset in m                                  
  // d = grid distance for real world  in m [double, 6]
  // g = grid distance for paper coordinates in mm [double, 6]
  // i = grid and zone
  // m = map scale
  // r = real world cord (0 = paper, 1 = real world)
  // x = real world offset easting 
  // y = real world offset northing
si_DbCreateObjPar = 1040;
  // c = condition
  // d = dataset
  // t = text field
  // m = unit of measure (m = m, km = km)
  // u = horizontal offset
  // v = vertical offset
  // x = horizontal field
  // y = vertical field
si_SelectedSpotColors = 1041;
si_XmlScriptPar = 1042;                                                          
  // f = last used file
si_BackupPar = 1043;                                                             
  // p = path
si_ExportPartOfMapPar = 1044;                                                    
  // b = boundary (0=rectangular boundries, 1=selected object for boundries)
  // s = export with selected object (0=false, 1=true)
  // r = reference point for part of map setup ([0..8])                         
  // l = export database links (0=false, 1=true)                            
si_DemPar = 1045;                                                                
  // First = file
  // l = DEM loaded
  // f = Frame visible
  // i = last used import folder                                                
si_GpsImportFilePar = 1046;                                                      
  // a = assign symbol (true/false)
  // t = symbol number for tracks
  // w = symbol number for waypoint
si_ImportCsv = 1047;                                                             
  // n = point symbol number
  // t = text symbol number
si_RelayCoursesDialog = 1048;                                                   
  // First = last exported or printed course (STRING)
  // l = legs (-1=All) (INT)
  // p = variants selected (0=start numbers, 1=variants) (BOOL)
  // s = start number (-1=All) (STRING)
  // v = variants index (-1=All) (INT)
si_CsAutoControlDescription = 1049;                                              
  // First = ocd background map file name for auto control description (STRING)
  // a = auto control description (0=off, 1=off) (BOOL)
si_GpxExportPar = 1050;                                                           
  // First = description
  // a = author
  // k = keywords
  // r = routes or tracks (true = routes, false = tracks)
si_KmlInfo = 1051;                                                       
  // Description in ExpKml.pas
si_GpsRouteAnalyzer = 1052;                                                      
  // First = Project file
si_CoordinateSystemPar = 1053;        // only used for user defined grid                                
  //First = description
  // d = datumId
  // e = ellipsoidId
  // x = ellipsoid axis
  // t = ellipsoid flattening
  // r = projectionId
  // m = false easting
  // n = false northing
  // f = scale factor
  // c = central meridian
  // o = longitude of origin
  // a = latitude of origin
  // s = standard parallel 1
  // p = standard parallel 2
  // l = location
  // z = azimuth
  // g = EPSG code                                                               
si_GraticulePar = 1054;                                                           
  // h = horizontal distance
  // v = vertical distance
  // l = symbol number for grid lines
  // t = symbol number for text labels
si_GraticuleNameIndexPar = 1055;                                                 
  // s = style
  // x = index origin of longitude
  // y = index origin of latitude
  // h = horizontal distance
  // v = vertical distance
si_KmzExportPar = 1056;                                                         
  // first = Name: string
  // t = Tiles: integer (0 = no tiles, 1 = Garmin Custom Maps optimized, 2 = tiles)
si_LegendPar = 1057;                                                             
  // u = show only Used Symbols
  // v = show also hidden symbols                                                
  // h = icon Height
  // w = icon Height
  // y = line Spacing100
  // p = show Point Symbols
  // l = show Point Symbols
  // a = show Point Symbols
  // r = show Point Symbols
  // t = show Point Symbols
  // z = show Point Symbols
  // d = description Symbol
  // s = show Symbol Number
si_RulersPar = 1058;                                                           
  // no First
  // s = show (0=false, 1=true)
  // x = ruler origin x (INTEGER, OCAD coordinate)
  // y = ruler origin y (INTEGER, OCAD coordinate)
  // m = move also ruler guides (0=false, 1=true)
si_RulerGuidesPar = 1059;                                                         
  // no First
  // s = show (0=false, 1=true)
  // l = lock (0=false, 1=true)
si_DbOptions = 1060;                                                             
  // c = create record when cutting object (0=false, 1=true)
  // d = delete record when deleting object (0=false, 1=true)
si_MapNotes = 1061;                                                              
  // First = text
si_SendFileByEmail = 1062;                                                        
  // First = subject
  // t = to
  // d = add loaded DEM (0=false, 1=true)
  // a = add loaded databases (0=false, 1=true)
  // b = add loaded databases (0=false, 1=true)
  // l = add loaded databases (0=false, 1=true)
si_MapGridPar = 1063;                                                             
  // a = angle
  // e = easting offset
  // n = northing offset
  // h = horizontal (easting) distance
  // v = vertical (northing) distance
  // x = create easting grid lines
  // y = create northing grid lines
  // j = create vertices at grid junctions                                       
  // l = symbol number for grid lines
  // s = grid labels 
  // t = symbol number for text labels
si_DemSlopePar = 1064;                                                           
  // m = Method: 0 = continuous; 1 = black/white
  // c = Slope for black pixels in continuous method
  // b = Slope for black pixels in black/white method
  // l = load slope map as background map
si_DemProfilePar = 1065;                                                        
  // First = profile template path
  // a = scale option (0=auto-scale, 1=used defined scale)
  // c = scale
  // d = distance unit (0=km, 1=m)
  // g = show grid (0=false, 1=true)
  // m = time unit (0=h:mm)
  // r = round time steps (0=no round, 5=round to 5 minutes, 10=round to 10 minutes)
  // t = show text at the bottom of the profile (0=false, 1=true)
  // x = length resolution
  // z = elevation resolution
  // k = elevation factor
si_DemHillshadingPar = 1066;                                                    
  // m = Method: 0 = simple; 1 = combined
  // a = azimut
  // c = DEM cell size (0=false, 1=true)
  // d = declination
  // e = exaggeration
  // i = interpolation mode (INTEGER)
  // l = load hillshading as background map
  // r = resolution
si_DemHypsometricMapPar = 1067;                                                  
  // c = color ramp type [0..2] (INTEGER)
  // l = load hillshading as background map
  // w = use white color for elevation 0 (0=false, 1=true)
si_DemClassifyVegetationPar = 1068;                                              
  // m = Method: 0 = grayscale; 1 = colored
  // g = Grayscale color ramp: 0 = linear, 1 = quadratic negative, 2 = quadratic positive
  // l = load hillshading as background map
si_ShapeExportPar = 1069;                                                       
  // a = item 'area objects' selected (0=false, 1=true)
  // c = create projection file
  // d = dataset ['all' = All Objects or name of dataset]
  // l = item 'line objects' selected (0=false, 1=true)
  // p = item 'point objects' selected (0=false, 1=true)
  // r = replace word wrap by tilde (0=false, 1=true)
  // t = item 'text objects' selected (0=false, 1=true)
  // u = UTF-8 Encoding (0=false, 1=true)                                        
si_DxfExportPar = 1070;                                                         
  // a = convert text from ANSI to OEM (0=false, 1=true)
  // o = convert text from OEM to Unicode (0=false, 1=true)
  // s = only objects with selected symbol (0=false, 1=true)
  // l = add symbol description in DXF layer name (0=false, 1=true)
  // e = export OCAD Curves as DXF splines (0=false, 1=true)
  // c = coordinates (0=m, 1=mm)
si_DemImportLasPar = 1071;                                                       
  // u = unclassified
  // g = ground
  // l = low  vegetation
  // m = mean vegetation
  // h = high vegetation
  // b = buildings
  // w = water class
  // o = other class
  // r = Return option
si_MapRoutingPar = 1072;                                                      
  // f = from (0=Location, 1=Coordinate)
  // l = from location
  // e = from easting
  // n = from northing
  // T = to (0=Location, 1=Coordiante)
  // L = to location
  // E = to easting
  // N = to northing
  // d = add driving directions (0=false, 1=true)
si_ServerOfflineBaseObjectList = 1073;
si_SmoothPar = 1074;
  // s = smooth tolerance
  // a = keep vertices if angle change is greater then
  // c = angle change tolerance
  // d = keep vertices if curvature direction changes
si_GeneralizePar = 1075;
  // a = delete vertices if angle change is less than
  // c = angle change tolerance
  // f = area factor (percent)
  // g = generalization type: 0=simplification; 1=rectangle; 2=corner; 3=series
  // i = keep corner vertices
  // j = keep dash vertices
  // n = number of rectangles
  // r = rectangle option: 0=rectangle for each object; 1=one rectangle for all objects; 2=corner; 3=series
  // t = offset tolerance (1/100mm)
si_PolylineToCurvePar = 1076;
  // t = tangent length factor
  // a = keep angle at polyline start/end
  // i = Keep incontinuity if angle change is greater than
  // v = angle incontinuity value
si_IntersectionPar = 1077;
  // a = intersection option (0=insert vertex, 1=cut line, 2=add point object)
  // v = vertex type (0=normal, 1=corner, 2=dash)
  // s = point symbol number
  // t = handle touching points as intersections
si_OcdLasPar = 1078;
  // First = file
  // l = DEM loaded
  // f = Frame visible
si_ThematicMapPar = 1079;
  // First = title
  // a = title color
  // b = title opacity
  // c = title font name
  // d = title font size
  // e = title isBold
  // f = title isItalic
  // g = title alignment
  // h = map height
  // i = Actual theme
  // m = additional information text color
  // n = additional information text opacity
  // p = additional information text font name
  // q = additional information text font size
  // r = additional information text isBold
  // s = additional information text isItalic
  // t = additional information text alignment
  // w = map width
  // x = additional information text
si_ThematicMapLegendPar = 1080;
  // First = EMPTY
  // a = legend title color
  // b = legend title opacity
  // c = legend title font name
  // d = legend title font size
  // e = legend title isBold
  // f = legend title isItalic
  // g = legend title alignment
  // m = legend text color
  // n = legend text opacity
  // p = legend text font name
  // q = legend text font size
  // r = legend text isBold
  // s = legend text isItalic
  // t = legend text alignment
  // v = add theme legend
  // w = add basemap legend
si_ThematicMapScaleBarPar = 1081;
  // First = EMPTY
  // c = scale bar color
  // d = scale bar line width
  // m = scale text color
  // n = scale text opacity
  // p = scale text font name
  // q = scale text font size
  // r = scale text isBold
  // s = scale text isItalic
  // t = scale text alignment
  // v = add scale bar
  // w = add scale text
si_SelectObjectsByDatePar = 1082;
  // c = Creation data checked (boolean: 0=false, 1=true)
  // f = from dataTime (double)
  // t = to dataTime (double)
  // a = All objects  checked (boolean: 0=false, 1=true)
si_DemCreateContourLinesPar = 1083;
  // a = equidistance level 1, multiplyed by 100 (cardinal)
  // b = equidistance level 2, multiplyed by 100 (cardinal)
  // c = equidistance level 3, multiplyed by 100 (cardinal)
  // d = symbol number level 1 (cardinal)
  // e = symbol number level 2 (cardinal)
  // f = symbol number level 3 (cardinal)