You create genlets in a C# or other .NET projects.
Right-click your project in the Solution Explorer and select Add > New Item.
In the Add New Item dialog, expand the PowerDesigner category and select the File Synclets item.
Choose a genlet type, specify a name, and then click OK to create the item. The editor opens to display the genlet template:
Enter your transformation code and save the file:
Right-click your model in the Solution Explorer and select Synchronize, to open the Synchronization wizard (see Code Synchronization).
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.
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.
[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.
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.