Drawing sheet format

The structure of a drawing sheet object is:

  • HEADER

  • TEXT BOXES (= box_1 box_2 ... end_of_boxes)

  • SYMBOLS (= symbol_1 symbol_2 ... end_of_symbols)

  • TABLES (= table_1 table_2 ... end_of_tables)

Comments can be placed anywhere in the file in this format: /* comment */

The structure of the header section: h1; h2; ...; h7;

The data fields are:

  • h1 – Width (u) of the sheet blank area (length quantity)

  • h2 – Height (v) of the sheet blank area (length quantity)

  • h3 – u min of the area reserved for the drawing (length quantity)

  • h3 – v min of the area reserved for the drawing (length quantity)

  • h5 – u max of the area reserved for the drawing (length quantity)

  • h6 – v max of the area reserved for the drawing (length quantity)

  • h7 – Text margin (length quantity), applied to all text fields

TEXT BOXES

The TEXT BOXES definition block consists of a number of text box definitions. Each text box can be associated with a number of data items. When a drawing is produced, these data items are retrieved from the header file of the drawing and plotted according to the text box definition.

The structure of a text box definition:

  • BOX HEADER

  • DATA REQUESTS (= req_1 req_2 ... end_of_reqs)

BOX HEADER

The structure of a BOX_HEADER definition: b1; b2; ...; b21;

The data fields and their maximum lengths (in parenthesis) are:

  • b1 – a string of characters (3) specifying the name of the box. This name is used to store the text into the header file if the user is allowed to edit the text. An empty string indicates the end of text box definitions, and in this case the other fields must be omitted.

    Important: The name of a text box must not be any tag already used in the header.

  • b2 – u min of the box (length quantity)

  • b3 – v min of the box (length quantity)

  • b4 – u max of the box (length quantity)

  • b5 – v max of the box (length quantity)

  • b6 – number of text lines in the box

  • b7 – line spacing

  • b8 – maximum number of characters on one line

  • b9 – flag indicating the direction of text lines in the box: 1 = u-axis; 0 = v-axis

  • b10 – flag indicating if a frame is to be plotted around the box: 1 = plot; 0 = frame not plotted

  • b11 – if a single integer is present, then b11 defines the ID number of the pen used to plot the frame. The same int is used as the color ID. Instead of a single integer, the field can look like this: <int color_id> : <float line_width>. In the latter case, color_id (int) is an index to the Colors and line_width is the line thickness in mm (Line Widths).

  • b12 – flag indicating whether the filling of text lines in the box starts from the top (1) or the bottom (0) of the box

  • b13 – code defining the horizontal justification of text: 1 = left justified, 2 = centered, 3 = right justified

  • b14 – flag indicating if the user is allowed to edit the text before it is plotted: 1 = allow edit, 0 = no edit

  • b15 – a prompt string (39) shown to the user who is about to edit the text to be plotted

  • b16 – height of text (length quantity)

  • b17 – width of text, or 0 to use the default value (0.77 * height of text)

  • b18 – spacing between characters, or 0 to use the default value (0.22 * height of text)

  • b19 – slant of text, between -90....90 degrees

  • b20 – pen ID, or color + line width, see b11

  • b21 – format (59) that controls how the strings resulting from the data requests are combined to form the output. Must contain as many occurrences of "%s" as there are data requests for this box.

Note: b17 and b18 are not applicable to Windows fonts.

Data Requests

DATA REQUESTS consists of a variable number of data requests each having the following structure: r1; r2; r3;

The data fields and their maximum lengths (in parenthesis) are:

  • r1 – a string of characters (3) identifying the target of the request. This can be a document header tag (see Header file for document) or it can be the creation date ("DAT") or creation time ("TIM") obtained from the system (see DATE and TIME formats). An empty string indicates the end of requests, and in this case the other fields must be omitted.

  • r2 – a number specifying the quantity type of the data (NS, LENGTH ...) identified by r1. If -1 then the data is not considered numeric.

  • r3 – a format string (11) specifying how the numeric data is to be output. If empty then conversion takes place according to the format specified in the quantity definition table for this quantity. These were described in chapter 3. For system parameters (time, date) this field contains a parameter specific output format selector.

SYMBOLS

The SYMBOLS definition block consists of a variable number of symbol definitions. The structure of a symbol definition is as follows: s1; s2; ...; s6;

The data fields and their maximum lengths (in parenthesis) are:

  • s1 – a string of characters (13) specifying the name of the symbol to be plotted. The symbol must be found from the active symbol library. An empty string indicates the end of symbols, and in this case the other fields must be omitted.

  • s2 – u-coordinate of the local origin of the symbol (length quantity)

  • s3 – v-coordinate of the local origin of the symbol (length quantity)

  • s4 – A number specifying the scale applied to the symbol in u-direction

  • s5 – A number specifying the scale applied to the symbol in v-direction

  • s6 – Rotation angle from the default orientation (angle quantity)

TABLES

The TABLES definition block consist of a variable number of table definitions. The structure of a table definition is as follows:

  • TABLE HEADER

  • COLUMNS (= col_1 col_2 ... end_of_columns)

TABLE HEADER

The structure of TABLE HEADER is as follows: t1; t2; ...; t13;

The data fields and their maximum lengths (in parenthesis) are:

  • t1 – string (3) specifying the extension of the file that is associated with this table. An empty string indicates the end of tables, and in this case the other fields must be omitted.

  • t2 – u min of the table (length quantity)

  • t3 – v min of the table (length quantity)

  • t4 – u max of the table (length quantity)

  • t5 – v max of the table (length quantity)

  • t6 – number of rows in the table

  • t7 – number of rows to be filled before leaving empty rows

  • t8 – number of rows to be left empty between filled rows

  • t9 – flag indicating the direction of rows in the table: 1 = u-axis; 0 = v-axis

  • t10 – code indicating how the frame is to be plotted around the table: 0 = no frame; 1 = frame all rows; 2 = frame filled rows only and position the table so that it starts from v_max or u_min, 3 = frame filled rows only and position the table so that it starts from v_min or u_max

  • t11 – pen id, or color + line width, see b11

  • t12 – flag indicating whether the filling of rows in the table starts from the top (1) or from the bottom (0) of the table

  • t13 – flag indicating if text is allowed to continue to the next row: 0 = not allowed, 1 = allowed

COLUMNS

The structure of COLUMNS is as follows:

  • COLUMN HEADER

  • DATA REQUESTS (= req_1 req_1 ... end_of_requests)

Column Header

The structure of COLUMN HEADER is as follows: c1; c2; ...; c14;

The data fields and their maximum lengths (in parenthesis) are:

  • c1 – string (3) specifying the name for the column. An empty string indicates the end of columns, and in this case the other fields must be omitted.

  • c2 – lower row position of the column (length quantity) relative to the origin of the table

  • c3 – upper row position of the column (length quantity) relative to the origin of the table

  • c4 – number of sub-rows in the column

  • c5 – maximum number of characters in the column

  • c6 – code defining the horizontal justification of text as follows: 1 = left justified; 2 = centered; 3 = right justified

  • c7 – flag indicating if the contents of the column is to be queried from the user: 1 = query; 0 = no query (NOT implemented in the current version, use 0)

  • c8 – prompt string (39) shown when the user is to input the text to be plotted. (NOT implemented in the current version, leave empty)

  • c9 – height of text (length quantity)

  • c10 – width of text, or 0 to use the default value (0.77 * height of text)

  • c11 – spacing between characters, or 0 to use the default value (0.22 * height of text)

  • c12 – slant of text (must be between -90....90 degrees)

  • c13 – pen id, or color + line width, see b11

  • c14 – format string (59) that controls how the strings resulting from the data requests are combined to form the output. Must contain as many occurrences of "%s" as there are data requests for this box.

Data Request

Consists of a variable number of data requests each having the following structure: r1; r2; r3;

The data fields and their maximum lengths (in parenthesis) are:

  • r1 – a string of characters (3) identifying the target of the request. This must be one of the following: a reference to one of the data fields found in the records of the data file associated with this table; a document header tag (see Header file for document); the creation date ("DAT") or creation time ("TIM") obtained from the system (see DATE and TIME formats). An empty string indicates the end of requests, and in this case the other fields must be omitted.

  • r2 – a number specifying the quantity type of the data (NS, LENGTH ...) identified by r1. If -1 then the data is not considered numeric.

  • r3 – a format string (11) specifying how the numeric data is to be output. If empty, then the conversion takes place according to the format specified in the quantity definition table for this quantity. For system parameters (time, date), this field contains a parameter specific output format selector.