Creating the Waste System application
This topic explains how to create the supplied waste system application (WinApp.exe) from the Waste System model.
* 
You will need Microsoft Visual C++ and the C++ Standard Template Library available for the building of the application. For information about which versions of Visual C++ are supported, see the Modeler Release Notes.
The supplied Model Settings File (Waste System.sni) assumes that Modeler has been installed to default folders, and the standard Visual Studio libraries have been installed to their default folders.
The provided Waste System application (WinApp.exe) is built using the 'Cpp Win32 Animation EXE' ACS Code Generator DLL. If you want to generate the application using a production Code Generator DLL, you must not generate any Classes as stubs, and you must comment out the body code of the Main function.
To create the Waste System application:
1. Before generating and building the Waste System application, ensure that you have built the dependent libraries.See Overview of generating C++ code for system simulation.
2. From Modeler, open the Waste System model, which resides in the Examples database.
3. On the Packages pane, select the Design package to make it the root object for generation.
4. On the ACS/TDK Control tab, click the Load or Unload ACS button.
5. On the ACS/TDK Control tab, click the Edit ACS Scheme button.
6. From the Launch ACS/TDK dialog, click the Settings File selection button.
7. Select the provided Waste_System.sni file that resides in the following folder (assuming you have installed Modeler to the default location):
C:\ProgramData\PTC Integrity Modeler\Example\Waste System
8. If the Generator DLL box does not show the Cpp Win32 Animation.dll Code Generator DLL as selected, click the Generator DLL selection button, and then select the Cpp Win32 Animation Code Generator DLL.
If you have installed Modeler to the default location, the path of the Cpp Win32 Animation Code Generator DLL is as follows.
For Windows 7 and later operating systems:
C:\Users\<user>\AppData\Roaming\ItsShadow\ScriptDir\cppgen\cpp win32 animation
For pre Windows 7 operating systems (64-bit versions of):
C:\Program Files (x86)\PTC Integrity Modeler\Modeler\System\cppgen\cpp win32 animation
For pre Windows 7 operating systems (32-bit versions of):
C:\Program Files\PTC Integrity Modeler\Modeler\System\cppgen\cpp win32 animation
9. If required, change the Target Directory for generated code.
10. On the Simulation tab, confirm that the cIPEvHdler class (which resides in the Design\Simulation Package) is selected as the Harness class, and the following Classes (in the same Package) are selected as Classes to Stub:
cBCReaderOP
cBeltOP
cCagerOP
cPanelOP
cRouterOP
cScannerOP
11. Click the Save and Launch button.
Wait for ACS to finish generating to the cache - when complete, the ACS/TDK Control tab shows the status as Ready.
12. On the ACS/TDK Control tab, click the Force Generate button.
Wait for ACS to finish generating to the code - when complete, ACS/TDK Control tab shows the status as Ready.
13. Using Microsoft Visual C++, open the dsp project that was created in ACS target folder.
14. From the target directory and its subdirectories, add all the generated .h and .cpp files to the dsp project:
15. Build the application.
For information about starting the waste system simulation, see Starting the Waste System simulation.