Using script explorer and script editor I managed to customize DDL script generation, e.g. PERCodeGeneratorMY. This works fine.
But how can I easily switch between different generators?
At the moment I have to edit the original script and press save and commit.
Is there a way to easily connect the DDL script generation dialog with different scripts, e.g. PERCodeGeneratorMY1, PERCodeGeneratorMY2, PERCodeGeneratorMY3?
A dropdown list in DDL script generation dialog to select the variant I need would be great!
Where are the scripts saved in the filesystem, I’d like to backup my changes?
Is there a way to define custom properties in a PDM, e.g. additional boolean checkboxes in a customized Edit Table dialog?
Or is there a way to set custom parameters manually somehow in the Edit Table dialog?
Even in the Edit Attribute dialog would be very helpful.
I like to use this additional parameters to influence the generation done by my customized DDL Script generator.
The only idea I have on that is to use a special comment in After Script oder Comment area and parse for that in the generator script!?
Customization of DDL Script Generation:
Unfortunately, it is possible to have only one generator for one model type (MY51, OR10 etc.). However, it is possible to extend or change functionality of the generator. The generator can behave in a different way (accordig to defined parameters), but it is not possible to have two different generators.
An example on how to modify the generator is shown in the attached package (done for MySQL 5.1).
Please copy the .txg file to the location where you store your user packages. Default location is:
C:\Documents and Settings\user name\My Documents\Toad Data Modeler\Installation name\Packages{DCB5CB9B-CF65-4350-86B5-285D246FC5AC}
Run TDM and open MySQL 5.1 model. See the changes in the DDL Script Generation dialog.
Tip: We recommend you to have a look at the script FmPERGenerator that is the starting point for execution of the generator. The script is saved in folder Form Events in Script Explorer.