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) > Generating an ACS Code Generator DLL from a TDK model > Generating an ACS Code Generator DLL (TDK)
  
Generating an ACS Code Generator DLL (TDK)
Setting up the TDK model
1. In Modeler, open the TDK model from which you want to generate an ACS Code Generator DLL.
For information about creating a TDK model for generating a provided ACS Code Generator DLL, see Creating a TDK model for generating a provided ACS Code Generator DLL (TDK).
2. If the TDK model can generate multiple ACS Code Generator DLLs (provided Ada, C, C#, C++, IDL, Java, SQL and VB TDK models), set up the TDK model to generate the required ACS Code Generator DLL:
To create a new ACS Code Generator DLL that overwrites a provided ACS Code Generator DLL:
Right-click the TheGenerator package, point to Build Settings, and then click the command for the ACS Code Generator DLL you want to overwrite.
To create a new ACS Code Generator DLL that does not overwrite a provided ACS Code Generator DLL:
Right-click the TheGenerator package, point to Build Settings, and then click the command for the ACS Code Generator DLL type you want to generate. After setting up the TDK model for the ACS Code Generator DLL type you want to generate, right-click the TheGenerator package, point to Build Settings, and then click Custom Generator so that the name of the generated ACS Code Generator DLL is based on the name of the model.
* 
Build Settings commands require the TheGenerator package and its child Packages to be unprotected. To unprotect the Packages: open the TheGenerator package's Property Pages, click the Access Permissions tab, clear the Protected check box, and then click the Copy Protected Flag to Child Packages button.
3. Set the name of the ACS Code Generator DLL that will be generated through the TemplateList tag definition that is applied to the TheGenerator package by the Generatorstereotype. How?
For example, if you are going to build a release Code Generator DLL using Visual C++ 6.0, set the value of the [Release] entry. For information about the other tag definitions, see TDK model configuration options (TDK).
Setting up generation options
1. Ensure that the ACS/TDK Control toolbar is shown. How?
2. If the ACS/TDK Control toolbar displays Not Connected (TDK not loaded), click the Load or Unload ACS button.
After TDK is loaded, the ACS/TDK Control toolbar displays Connected.
3. If on the ACS/TDK Control toolbar the Enable or Disable Code Generation button is not depressed, click the Enable or Disable Code Generation button.
4. If on the ACS/TDK Control toolbar the Enable or Disable Reverse Engineering button is depressed, click the Enable or Disable Reverse Engineering button.
Creating the generation settings scheme
1. In the Packages pane, select the TheGenerator package.
* 
When generating from a TDK model, the TheGenerator package is always the root item.
2. On the ACS/TDK Control toolbar, from the first drop-down list select the Generation Settings Scheme you want to use to generate the SDL files. The drop-down list lists any Generation Setting Schemes that have been created for the TheGenerator package.
If you have not created any Generation Settings Schemes for the TheGenerator package, create a new Generation Settings Scheme. How?
Generating the SDL files
1. On the ACS/TDK Control toolbar, click the Start button.
The ACS/TDK Control toolbar displays Loading Model, followed by either First Generation or Updating Code, followed by Ready.
2. If this is the first time you have used the Generation Settings Scheme to generate SDL files, no SDL files are generated at this point. To generate SDL files the first time, you must force a generation:
a. Ensure that the ACS/TDK Control toolbar is displaying Ready.
b. On the ACS/TDK Control toolbar, click the Force Generate button.
c. From the confirmation dialog, click Yes.
Building the ACS Code Generator DLL
1. On the ACS/TDK Control toolbar, from the second drop-down list select the TDK configuration you want to build. The following configurations are available:
VS2010Release — to build using Microsoft Visual C++ 2010 (Visual C++ 10.0), including the Express version, in Release mode.
VS2010Debug — to build using Microsoft Visual C++ 2010 (Visual C++ 10.0), including the Express version, in Debug mode.
VS2012Release — to build using Microsoft Visual C++ 2012 (Visual C++ 11.0), including the Express version, in Release mode.
VS2012Debug — to build using Microsoft Visual C++ 2012 (Visual C++ 11.0), including the Express version, in Debug mode.
VS2013Release — to build using Microsoft Visual C++ 2013 (Visual C++ 12.0), including the Express version, in Release mode.
VS2013Debug — to build using Microsoft Visual C++ 2013 (Visual C++ 12.0), including the Express version, in Debug mode.
VS2015Release — to build using Microsoft Visual C++ 2015 (Visual C++ 14.0), including the Express version, in Release mode.
VS2015Debug — to build using Microsoft Visual C++ 2015 (Visual C++ 14.0), including the Express version, in Debug mode.
GccRelease — to build using GNU GCC compiler version 3.4.4 in Release mode.
GccDebug — to build using GNU GCC compiler version 3.4.4 in Debug mode.
2. If on the ACS/TDK Control toolbar the Enable or Disable TDK button is not depressed (TDK compiler not enabled), click the Enable or Disable TDK button.
3. On the ACS/TDK Control toolbar, click Force Generate.
TDK starts building the ACS Code Generator DLL and its code generator dll. The progress is reported in the ACS/TDK Log pane.
4. If you are prompted to locate the Windows.h file, this file can normally be found in the following folder.
For 64-bit versions of Windows:
C:\Program Files (x86)\Microsoft SDKs\Windows\v6.0A\Include
For 32-bit versions of Windows:
C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include
TDK creates a new ACS Code Generator DLL, which ACS can use to generate code. TDK creates the Code Generator DLL in the appropriate Modeler language folder. If you install Modeler to the default location, the language folders are in subfolders of the following folder.
For 64-bit versions of Windows 7 or later operating systems:
C:\Program Files (x86)\PTC Integrity Modeler\Modeler\System
For 32-bit versions of Windows 7 or later operating systems:
C:\Program Files\PTC Integrity Modeler\Modeler\System
While TDK is enabled, changes to the TDK model will result in TDK updating the ACS Code Generator DLL. You can disable TDK and make TDK update the ACS Code Generator DLL only when the Run TDK toolbar button is clicked.
* 
If after selecting a Windows.h file you need to change to an alternative Windows.h file, open a Command Prompt window and then run the following command:
SDKLocator –d VC<visual studio version number> SDK
Where <visual studio version number> is the main version number of the Visual Studio you are using.
For example, if you are using Visual Studio 2008 the version number is 9:
SDKLocator –d VC9 SDK