Model, Component, and Package Management > Model management > Working with the supplied example models > BallCpp model > Overview of the BallCpp application
  
Overview of the BallCpp application
This model is supplied to let you see a simple model developed with, and providing an illustration of, the Automatic Code Synchronization (ACS) technology.
Running the executable file that can be created from this model will result in a 'train' of 'o' characters moving within a rectangular frame, and bouncing off the frame walls. The model itself is very simple and can be easily changed to alter the effect of running the executable.
To use this model with ACS you will require an ACS license, an ACS Language Pack for C++ license and a Modeler license.
Before generating and building the C++ Code application, ensure that you have built the dependent libraries. See Overview of generating C++ code for system simulation.
To find out more about installing and using ACS, see Overview of ACS (ACS).
To generate the BallCpp application through ACS:
1. In Modeler, open the BallCpp model.
2. On the Packages pane, select the Model.
3. If the ACS/TDK Control toolbar is not shown: on the View menu, point to Toolbars, and then click ACS/TDK Control.
4. On the ACS/TDK Control toolbar, click the Load/Unload button.
5. On the ACS/TDK Control toolbar, click the Edit Scheme button.
6. From the Launch ACS/TDK dialog, click the Settings File selection button.
7. Select the provided BallCpp.sni file that resides in the following folder (assuming you have installed Modeler to the default location).
C:\ProgramData\PTC Integrity Modeler\Example
Most options on the Launch ACS/TDK dialog should be set as required.
8. Click the button associated with the Generator Dll box, and select the Cpp Win32 Production Code Generator DLL.
If you have installed Modeler to the default location, the Code Generator DLL appears in the following folder:
For Windows 7 and later operating systems:
%APPDATA%\ItsShadow\ScriptDir\cppgen\cpp win32 production
For pre Windows 7 operating systems (64-bit versions of):
C:\Program Files (x86)\PTC Integrity Modeler\Modeler\System\cppgen\cpp win32 production
For pre Windows 7 operating systems (32-bit versions of):
C:\Program Files\PTC Integrity Modeler\Modeler\System\cppgen\cpp win32 production
9. Specify the Target Directory for the code files.
10. Click the Save and Launch button.
11. On the ACS/TDK Control toolbar, click the Force Generate button.
You can now change the model to see corresponding change in the code files, or change operation bodies in the code files to see corresponding change in the model.
To create the executable in Visual C++:
1. From the target directory, double-click the appropriate generated WinApp file to open the project in Visual C++.
2. Add to the project, all the .h and .cpp files from the BallCpp folder.
Note that the StdAfx files should already be included in the project.
3. Build an executable (F7) or run directly (F5).