Import Template Structure
Each template typically consists of four sections or blocks.
In some cases, the request block is redundant and can be omitted. All blocks except for the global block are contained in braces, "{" and "}".
Global Block
The global block is the first block in the template. It specifies important facts about the files read by the template. The global block is also used to declare integer variables.
Header Block
The header block has two purposes. It determines whether the template can read a particular file. If any of the commands executed in the header block result in a failure condition (see below), then execution of the template stops and the program attempts to read the data file using the next template in the list. This process repeats until either the header block of a template successfully executes to completion or the last available template fails to read the target file. If the last template in the list cannot read the file, the generic XY data reader attempts to parse it as columns of numbers. The header block reads the number of requests and/or components in the file and their names.
Record Block
The record block is responsible for actually reading the data. It is assumed that data files are organized in a specific way. Each data file is divided into a series of records (or timesteps). Each record is comprised of a set of fields, which are, in turn, divided into sub-fields. The terminology used by the template to refer to fields and sub-fields is based on ADAMS request files. Each field is called a request and each sub-field is called a component. The same terms are used to refer to MADYMO components and channels, respectively.
Request Block
The request block reads the contents of one field. This block is called whenever the record block executes a read request or readln request command. If every request in the file contains only one component, no request block is needed. If no request block is present, Import automatically reads the next scalar value from the file when a read statement is encountered.