MDL format versions

The latest format version of the Model Description Language (MDL) is version 3. The main features of the different format versions are described below.

Format version 3

CADMATIC release 5.x added support for version 3 of the MDL format. This is the newest format and is used by default when generating new MDL files.

The first line of the MDL file specifies the format version: the string @(#)MDL3 indicates format version 3.

What is new in format version 3:

  • String can be placed between double quotes.

  • DEVC() and STRC() definitions support the GDL() sub-definition. This can be used to specify the Geometric Description Language (GDL) text to use for building the component model definition of a structural or equipment.

Strings can still be presented as in format version 2. Any special characters must be escaped by a preceding backslash.

Format version 2

CADMATIC release 4.2 added support for version 2 of the MDL format. While this was the new default version for generating MDL files, it was still possible to generate also format version 1 that could be read by older versions of Plant Modeller.

Format version 2 introduced a header section and allowed reserved characters ",=()" to be used as data and as syntax tokens.

Header Section

Starting from version format 2, MDL files have a header section that consists of two parts:

  • Format version identification line.
  • Header tag record.

The first line of the MDL file specifies the format version: the string "@(#)MDL2" indicates format version 2. Any characters that follow the version identifier string, up to a newline character, are ignored. Files with no format version identifier are assumed to contain format version 1.

The version identification line is followed by a header tag record. Tags in this record provide general information about the creator and the contents of the MDL file.

Reserved Characters

Special characters ",=()" are escaped with a backslash in data strings such as attribute values and object names.

Format version 1

The initial version of MDL format did not have a header that would identify the version. Thus, files with no format version identifier in the header are assumed to contain format version 1.

Also, in format version 1 it was not possible to use special characters ",=()" as data—they were always intercepted by the MDL parser.