Overview of generating C# code (C# code)
Automatic Code Synchronizer (ACS) helps you develop your application by generating the C# code files required to implement a Class Model defined in Modeler.
Using Modeler you can quickly define your system in an environment that allows you to view the class structure as a whole. You can use ACS to generate the C# code files that implement that class structure. Thereafter, you can use ACS to update the C# code with any changes made to the Class model in Modeler.
You can model C# specific information in the model through the C# Profile package:
For information about modeling different code elements of C#, see the topics in the Modeling C# Code in Modeler section of this Help.
For information about how Modeler items map to code elements in C#, see the topics in the Mapping Information section.
The provided Examples database includes the 'C# Another Block (Tetris) Example' model, which demonstrates how a C# application is modeled in a model.
When modeling C# code in your model, you may want to refer to .NET assemblies, for example, as base classes or data types. The .NET Assembly Importer imports .NET assemblies into a model. When you import a .NET assembly, the .NET Assembly Importer imports the .NET assembly's namespaces, public types, public members and protected members.
After you have set up ACS, it works in the background and you do not have to interact with it. ACS monitors a model and its generated code for changes:
If ACS detects a change made by you in the model that affects the code, ACS can automatically generate the relevant code files.
If ACS detects a change to code associated with an Operation body, ACS can automatically reverse engineer the changed text to the model.
ACS uses an ACS Code Generator DLL to generate the code.
* 
You can customize the supplied ACS Code Generator DLL through its associated TDK Code Generation Transformation Patterns model.
If you are modeling C# in a model for the first time, you may find it useful to look at the C# Another Block (Tetris) Example model, which is provided in the Examples database.
If you are learning to use Modeler and ACS, you may find the Modeler tutorials useful. For information about downloading and opening the Windchill Modeler tutorials, click here Windchill Modeler tutorials
To use ACS with C# code, you require an ACS license, a Modeler license and an ACS Language Pack for C# license. If you want to customize the generation of C# code, you additionally require an ACS Transformation Development Kit license.
For generic information about using ACS, including deciding on a strategy for reverse engineering reversible properties, click here Overview of shadow
For information about customizing ACS Code Generator DLLs through TDK, click here Overview of tdk (link works only if TDK is installed).
Was this helpful?