Organization

A template file is organized into blocks and when outputting a database, HyperMesh processes a template on a per-block basis. Blocks are output in the order that they are defined in the template file.

You define the beginning of a block with a scan command (*card, *component, *elements, and so on) and then close the block with the *output() command.

As an entity is requested for output, HyperMesh reads the information from the database. Within each block there are five independent levels that you can utilize when exporting information to the ASCII file (coded numerically):
  1. before() - At this level, you can define a series of commands that HyperMesh processes before moving to the next level. The before() level is executed once for each data type requested. Use this level to add comments and set up parameters on the following levels. Some of the data in the database is available at this level.
  2. beforecollector() - At this level, HyperMesh scans the database for the requested data type. Each time HyperMesh finds the requested data type collector, it executes the beforecollector() level. Use this level to add comments about the data and create groups. Collector data is available at this level.
  3. format() - At this level, HyperMesh processes the commands defined for each entity contained in a collector. The data associated with the printed entity is available, and the format required for each entity is defined at this level.
  4. aftercollector() - After the data entities within a collector have been processed, HyperMesh goes to the aftercollector() level. The aftercollector() level is processed after each collector is scanned. Only the collector data is available at this level.
  5. after() - The after() level is similar to the before() level. HyperMesh executes the after() level once after HyperMesh scans the database.

The before() and after() blocks are executed even if none of the entities specified exist in the database. Database information (except for global data) is only available on levels two through four.