Creating a Genlet

You create genlets in a C# or other .NET projects.

  1. Right-click your project in the Solution Explorer and select Add > New Item.
  2. In the Add New Item dialog, expand the PowerDesigner category and select the File Synclets item.
  3. Choose a genlet type, specify a name, and then click OK to create the item. The editor opens to display the genlet template:


  4. Enter your transformation code and save the file:


  5. Right-click your model in the Solution Explorer and select Synchronize, to open the Synchronization wizard (see Code Synchronization).
  6. On the Code Generation page, select a file type (for example Source), and click the Details button to open the Generation Details dialog:


    This dialog allows you to specify whether to synchronize object and file creation and deletion, and also to add any genlets.

  7. Click the Add button to open the Add Genlet dialog:


    Select the genlet to add (or click the Open Assembly button to choose additional assemblies from which to select your genlets) and click OK to return to the Generation Details dialog, and then click OK again to return to the Synchronize dialog.

  8. [optional] Select a transformlet and use the Up and Down arrows to change its position in the chain of genlets. Use the Remove button to remove the selected genlet.
  9. Once you have completed the Synchronization wizard and generated your files, the transformation specified will have been applied to all the files of the specified type.

Note that changes to genlets are not automatically updated in synchronized files. When you change a genlet, you must then click the Refresh tool in order to force a synchronization.