Templates (Profile)

GTL templates extract text from PowerDesigner property values for use in generated files or other contexts.

  1. Right-click a metaclass, a stereotype, or a criterion (or the Shared category, if the template applies to all metaclasses) and select New > Template to create a template.
  2. Enter a name for the template. You should not use spaces in the name and, by convention, templates are named in headless camelcase (for example myTemplate).
  3. [optional] Enter a comment to explain the use of the template.
  4. Enter GTL code (see Customizing Generation with GTL) in the text box.
    In this example, myTemplate is defined on the Class metaclass, and will generate the name of the class followed by a list of its attributes: