Previous Topic: Open a Template FileNext Topic: Create a New Template File


Create a New Template

Using the Template Editor, you can create a new template by starting with an existing template and modifying it, or by starting with an empty template and adding new source in the Template Source pane. When you create a new template, you are prompted to name it and categorize it.

To create a new template

  1. Select Forward Engineer, Forward Engineering Templates from the Actions menu (in either a physical or logical/physical model).

    The Template Editor opens.

  2. Click the New Template icon on the Template Editor toolbar.

    A new default template name is added to the list in the Templates pane.

  3. Enter a name for the template to associate it with a template category.

    Note: Use one of the following as the first word of the template name to associate it with that category: Create, Alter, Drop, Insert, or Clause. Any other name is categorized as a Miscellaneous template.

    Your new template is placed in the template list based on the category you selected.

  4. Enter source or macros in the Template Source pane to build your template. Test your source against the object selected in the Sample Context box.

    Your source is parsed and the results display in the Expanded Text pane.

  5. Click the Save Template File icon if you are done creating the new template.

    The Save As dialog opens.

  6. Click Save to either save your template with the current template file, or enter a file name to save it as a new (*.fet) template file.

    The new template is saved and the Save As dialog closes.