Integrations (PTC products, 3rd party products and code) > Code integration (Ada, ARINC 653, C, C#, C++, IDL, Java, SQL and VB) > Transformation Development Kit (TDK) > Customizing an ACS Code Generator DLL > Customizing a TDK 3G model > Creating a new ACS Code Generator DLL in a TDK 3G model (TDK)
  
Creating a new ACS Code Generator DLL in a TDK 3G model (TDK)
This topic provides information for customizing a TDK 3G model - TDK 3G models were previously provided for generating the ACS Code Generator DLLs, but now TDK code generation transformation patterns modes are used. Tell me more...
* 
Do not change anything contained within the Generator, Support or TDK Generator Framework packages - if you do so, your changes will be lost should you update the TDK Code Generation Transformation Patterns model with improvements provided in a future release of Modeler.
To create a new ACS Code Generator DLL in a TDK 3G model:
1. Create a TDK 3G model for the code language you want to generate. How?
2. In Modeler, open the TDK 3G model you want to customize.
3. In the Packages pane, right-click the Model, point to New, and then click Package.
4. Type the name of the Package, and then press the Enter key. Any new items and diagram you create are created in this Package.
5. In the Package you created, create a clone of the GenClass class from which the ACS Code Generator DLL you want to customize was generated:
a. In the Generator::Model2Text package, select the GenClass class from which the ACS Code Generator DLL you want to customize was generated - its name will match the ACS Code Generator DLL.
b. On the Edit menu, click Copy.
c. Select the Package you created.
d. On the Edit menu, click Paste.
6. In the Package you created, change the name of your GenClass class to the name of the ACS Code Generator DLL you want to generate from it.
7. Open the Property Pages of your GenClass class, and then click the GenClass tab.
8. Change the tagged value of the ExplicitInstance tag definition to something that reflects the name of your ACS Code Generator DLL.
9. Right-click the Package you created, point to New, point to Diagram, point to UML, and then click Class Diagram.
10. Drag your GenClass class to the Class Diagram you created.
11. On the Class Diagram, right-click your GenClass class, point to Populate, and then click Super Classes
If a super Class is added, right-click that super Class, point to Populate, and then click Super Classes and so on until all the super Classes are added to your Class Diagram.
All the generation templates that are available to your GenClass class are now displayed on the diagram.
12. Create a new Build Statement command for setting up the TDK model to generate your new ACS Code Generator DLL:
a. Open the Property Pages of the «Build Settings» stereotype, which resides in the Generator package.
b. Click the Menu tab.
c. Click the New Item button.
d. Set the Context Menu Text value of the new entry to the name of your ACS Code Generator DLL followed by Build Settings.
e. Copy the script from another menu command to your new menu command.
You can access the script of an entry through the Edit Script button.
f. Change the script of your menu command accordingly.
For the TemplateList, rename the Code Generator DLL names for each configuration as appropriate. For the SelectGenerator Body, change the two entries to the name of the ExplicitInstance value you set in Step 8.
You can now use the command you created to set up the TDK model to generate your ACS Code Generator DLL.
13. Customize the generation templates for your ACS Code Generator DLL as necessary.
Changing a generation template in a TDK 3G model (TDK)
Creating a generation template in a TDK 3G model (TDK)