Customizing Generation with GTL

The PowerDesigner Generation Template Language (GTL) is used to extract model object properties as text. GTL is written in templates and generated files defined under metaclasses in language definition and extension files. It powers generation of code for business process, object-oriented and XML languages, and can be used to define new generations for any model.

When you launch a generation from a model, PowerDesigner generates a file for each instance of each metaclass for which you have defined a generated file (see Generated Files (Profile)) by evaluating the templates it calls and resolving any variables.

GTL is object-oriented, supporting inheritance and polymorphism for reusability and maintainability, and provides macros for testing variables and iterating through collections, etc.

A GTL template can contain text, macros, and variables, and can reference:
Note: Though GTL can be used to extend generation in a PDM, the standard generation is primarily defined using a different mechanism (see Database Generation and Reverse Engineering).