ICGD format
The structure of an ICGD object is:
- HEADER
- DEFINITION OF DATA TABLES
Comments can be placed anywhere in the file marked as follows: /* (any text) */
HEADER
The structure of HEADER is as follows: h1; h2; h3;
Data fields and their maximum lengths (in parentheses) are:
- h1, a string of characters(39) specifying the name of the primary drawing sheet object. If this string is left empty then ICGD generates only printable files.
- h2, an empty field. Must be present so that this ICGD definition is compatible with older versions.
- h3, a string of characters(39) specifying a label for the ICGD. Used to identify this ICGD in selection lists from which a user is to select one ICGD.
DATA TABLES
The DATA TABLES contains a set of instructions for each data table that is to be generated from the m-file.
The structure of one instruction set is as follows:
- CONTROL BLOCK
- FIELDS FROM CORPORATE CATALOG
- PLOT TITLE COLUMNS (omitted if table not plotted)
- PRINT HEADER FIELDS (omitted if table not printed)
- PRINT COLUMNS (omitted if table not printed)
- SELECTION RULES
- SORTING RULES
- SUMMING RULES
- PARAGRAPH TITLE
Control block
The structure of a CONTROL BLOCK is as follows: c1; c2; c3; c4;
Data fields and their maximum lengths are:
- c1, a string of characters (3) specifying the extension for the file to which the data table is to be generated. An empty string indicates the end of DEFINITION OF DATA TABLES section. NOTE ! Several tables can be stored to the same file. All tables in a file must be either plotted or printed.
- c2, a string of characters (39) specifying the name of the drawing sheet to which this table will be plotted. If empty and field c3 is also empty then table will be plotted to the same drawing sheet as the drawing.
- c3, a string of characters (63) specifying the pathname to a printer spool directory. If empty then the table will be plotted.
- c4, a string of characters (39) specifying the name of the format control file that is used to generate a print file of this table.
Fields from corporate catalog
FIELDS FROM CORPORATE CATALOG lists all reference abbreviations for data fields that are to be inserted into this table. Material entries in the m-file are expanded to contain the fields defined here.
The structure of this section is: f1; f2; ....;;
The end of the list is indicated by an empty field.
Plot title columns
PLOT TITLE COLUMNS defines columns of title records that are plotted at the beginning of the table. If the data table is to be printed then this section must be omitted.
The structure of a plot title column is as follows: ptc1; ptc2; ptc3;
Data fields and their maximum lengths are:
-
ptc1, a string of characters (3) specifying the name of the column. To get this column plotted the associated table in the drawing sheet should have a column where ptc1 is referenced. An empty string indicates the end of PLOT TITLE COLUMNS. In this case fields ptc2 and ptc3 must be omitted.
-
ptc2, a string of characters (59) specifying the value string for "ptc1".
-
ptc3, a number specifying the ordinal number of title record to which this column belongs to. Columns that are to appear on the same line (record) should be defined consecutively. Four title lines are available, numbered 0-3.
Print header fields
PRINT HEADER FIELDS contains definitions of fields that are to be printed at the beginning of the report. If the data table is to be plotted then this section must be omitted.
The structure of a print header field is as follows:
- HEADER FIELDS
- DATA REQUESTS
HEADER FIELDS consists of one or more header field definitions.
The structure of a header field is as follows: phf1; phf2; phf3;
Data fields and their maximum lengths are:
- phf1, a string (3) specifying a name for the field. The associated format control file must contain a page-relative header field that has the same name as that given here. An empty field indicates end of PRINT HEADER FIELDS. In this case fields phf2 and phf3 must be omitted.
- phf2, a flag indicating that the user is allowed to edit the text compiled according to the data requests. (1 = allow edit, 0 = no edit).
- phf3, a string of characters (59) specifying the C-print format that controls how the strings resulting from the data requests are combined to form the printed output. This format must contain as many occurrences of "%s" as there are data requests.
DATA REQUESTS consists of a variable number of data requests each having the following structure: r1; r2; r3;
Data fields and their maximum lengths 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 DATA REQUESTS. In this case the rest of the fields must be omitted.
- r2, a number specifying the type of the target data.
- r3, a format string (DM_L_SHDRFORMAT - 1) specifying how the target data is to be processed to convert it to desired ASCII representation.
For example Plant Modeller's "mot" tag can be converted to human understood format using the following data requests:
- mot; -2;0; /* output date as dd/mm/yy */
- mot; -3;0; /* output time as hh:mm */
Print columns
PRINT COLUMNS defines the contents of columns that appear on a printed list. The format control file must have a definition for a record named "LINE". Columns defined here are output to elements of this record.
One PRINT COLUMN is defined as follows:
- COLUMNS
- DATA REQUESTS
One COLUMN is defined as follows: pc1; pc2;
Data fields and their maximum lengths are:
- pc1, a string of characters (3) specifying the name of the column. The associated format control file must contain an element having this name. An empty string indicates the end of PRINT COLUMNS. In this case field pc2 must be omitted.
- pc2, a format string (59) that controls how the strings resulting from the data requests are combined to form the output for this column. This string must contain as many occurrences of "%s" as there are data requests.
Data Requests
The structure of DATA REQUESTS is the same as defined above in PRINT HEADER FIELDS. The only difference is that the target specified in a data request can address data fields specified in the m-file.
Selection rules
SELECTION RULES determine which entries of the m-file are included in this table. If no rules are given then all entries in the m-file are included. Rules are combined using the logical AND operator, e.g. an entry must satisfy all rules to be included.
The definition of a rule is as follows: ser1; ser2; ser3;
Data fields and their maximum lengths are:
- ser1, a string of characters (3) identifying the field from an m-file record that is used as an argument in this rule. An empty string indicates the end of SELECTION RULES. In this case fields ser2 and ser3 must be omitted.
- ser2, a string of characters (59) specifying the lower limit for the selection argument.
- ser3, a string of characters (59) specifying the upper limit for the selection argument.
The rule is satisfied by entries where the specified field has a value that is greater or equal to ser2 and less than ser3. If ser2 begins with character '!' then the rule is reversed i.e. rule is true if value is less than ser2 or greater or equal than ser3.
Note: Old selection rules that refer to "obt 3" (old pipe part) are automatically mapped to select "obt 9" (new piping part) objects. For a list of object type tags, see Object types hosted in Plant Modeller areas.
Sorting rules
SORTING RULES are used to determine the order in which the entries are output. Each rule defines one key field. The primary key is defined first.
A sort rule is defined as follows: so1; so2;
Data fields and their maximum lengths are as follows:
- so1, a string(3) identifying the field from an m-file record that is used as the sort key. An empty string indicates the end of SORTING RULES. In this case field so2 must be omitted.
- so2, a number specifying the type of the argument and order of sort: 0-sort numbers into ascending order; 1-sort numbers into descending order; 2-sort character strings into ascending order; 3-sort character strings into descending order.
Summing rules
SUMMING RULES determine the fields that must be equal in consecutive entries (in sorted order) before they can be combined into one entry. When entries are combined the following fields are summed: length, quantity, and area.
The structure of a SUMMING RULES is: f1; f2; ...;;
The end of SUMMING RULES is indicated by an empty field name.
Paragraph title
A table can be divided into paragraphs when the output records of the table are generated. A paragraph contains entries in which the primary sort key has the same value. Each paragraph is preceded by an output record containing one field - title. For example in the bill of material of an iso a paragraph could contain all parts that belong to one spool.
The structure of a PARAGRAPH TITLE is as follows: pt1; pt2;
Data fields and their maximum lengths are:
- pt1, a string of characters(3) specifying the name of the output field. An empty string indicates that paragraphs are not used.
- pt2, a format string(59) according to which the value of the primary sort key is output to the requested column. The format must contain one occurrence of "%s". This field must be present even if field pt1 is empty.