Modification of item names when inserted into C# (C# code)
The names of items in a model may be invalid if inserted directly into C# code, for example, they may contain spaces. For this reason, ACS may modify Modeler item names when they are inserted into your C# code.
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.
If you want to change how the ACS Code Generator DLL changes item names when inserted into the code, you must change the TDK Code Generation Transformation Patterns model from which the C# ACS Code Generator DLL was generated, and regenerate the ACS Code Generator DLL. In the TDK Code Generation Transformation Patterns model, the changing of item names is defined in the Name operation on the CSItem 4G business class.
* 
In SDL scripts use %Custom "C# Name" to return the scoped name of an item as it will appear in the C# code, or %Custom "Unscoped C# Name" to return the unscoped name of an item as it will appear in the C# code.