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 tab is shown. How?
2. If the ACS/TDK Control tab displays Not Connected (TDK not loaded), click the Load or Unload ACS button.
After TDK is loaded, the ACS/TDK Control tab displays Connected.
3. If on the ACS/TDK Control tab 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 tab 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 tab, 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 tab, click the Start button.
The ACS/TDK Control tab 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 tab is displaying Ready.
b. On the ACS/TDK Control tab, click the Force Generate button.
c. From the confirmation dialog, click Yes.
Building the ACS Code Generator DLL
1. On the ACS/TDK Control tab, from the second drop-down list select the TDK configuration you want to build. The following configurations are available:
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.
VS2017Release — to build using Microsoft Visual C++ 2017 (Visual C++ 15.0), including the Express version, in Release mode.
VS2017Debug — to build using Microsoft Visual C++ 2017 (Visual C++ 15.0), including the Express version, in Debug mode.
VS2019Release — to build using Microsoft Visual C++ 2019 (Visual C++ 16.0), including the Express version, in Release mode.
VS2019Debug — to build using Microsoft Visual C++ 2019 (Visual C++ 16.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 tab 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 tab, 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)\Windchill Modeler\Modeler\System
For 32-bit versions of Windows 7 or later operating systems:
C:\Program Files\Windchill 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 tab 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 2015 the version number is 14:
SDKLocator –d VC14 SDK
Was this helpful?