Integrations (PTC products, 3rd party products and code) > Code integration (Ada, ARINC 653, C, C#, C++, IDL, Java, SQL and VB) > C Code > Generating C Code > Overview of generating C code (C code) > Overview of modeling C code (C code) > Modifying object names when inserted into C (C code)
  
Modifying object names when inserted into C (C code)
Model object names in Modeler may be invalid if inserted directly into C code, for example, they may contain spaces. For this reason, ACS modifies Modeler object names when they are inserted into your C code. This modifying of names is controlled through C_Mangle.ini. ACS uses the C_Mangle.ini file to match model object names with their associated C code elements. Typically, you do not have to change the C_Mangle.ini file.
You can avoid using the mangled name of an item by specifying the exact name you want to insert into your code through the item's CODE_GENERATION_NAME property, which appears on the Text tab of an item's Property Pages. If you specify a CODE_GENERATION_NAME value for an item, ACS inserts that name into the code as is.
The C_Mangle.ini file resides in the 'PTC Integrity Modeler\Modeler\System\C_Sync' folder.
For each Modeler object type, you can add prefixes and suffixes. Specify the %parent% keyword to include the name of an item's parent item in a prefix or suffix.
* 
Through the C_mangle.ini file, unnamed Roles are generated with an 'r' prefix, and named Roles are generated without an 'r' prefix. Prefixing and suffixing of named and unnamed Roles is controlled through the [role] and [unnamed role] sections of the C_mangle.ini file. For example, if you want all Roles to be generated with an 'r' prefix, ensure that the Role sections of the C_mangle.ini file are as follows:
Note that
[role]
AddPrefix=r
AddSuffix=

[unnamed role]
AddPrefix=r
AddSuffix=
The C_Mangle.ini file specifies a maximum name length is 250 characters and the replacement or deletion of invalid characters. For example:
. is replaced with _
- is replaced with _
<space> is replaced with _
& is deleted
* is deleted
Notes
The C_Mangle.ini file refers to a Package as a Category.
When reverse engineering C code, the Reverser uses the C_Mangle.ini file to match the names of C Code elements with the mangled names of model items.
The generation templates use %Custom "C Name" to return the mangled scoped name of an item, or %Custom "Unscoped C Name" to return the mangled unscoped name of an item.