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. On the
ACS/TDK Control tab, click the
Load or Unload ACS button.
4. On the
ACS/TDK Control tab, click the
Edit ACS Scheme button.
5. From the Launch ACS/TDK dialog, click the
Settings File selection button.
6. 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.
7. 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:
%APPDATA%\ItsShadow\ScriptDir\cppgen\cpp win32 production
8. Specify the Target Directory for the code files.
9. Click the Save and Launch button.
10. On the
ACS/TDK Control tab, 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).