Main Content

Replacement Name: char


Specify names for built-in Simulink® data types in generated code.

Category: Code Generation > Data Type Replacement


Default: ''

If a value is not specified, the code generator uses the Code Generation Name, char_T.

Specify character vectors for the code generator to use as names for built-in Simulink data types.

To replace the Code Generation Name char_T, create a Simulink.AliasType object in the Command Window.

Set the BaseType object property to intn. Specify the name of the Simulink.AliasType object in the Replacement Name column. n is the number of bits set for Configuration Parameters > Hardware ImplementationNumber of bits: char.

An error occurs, if:

  • A replacement data type specification is inconsistent with the Simulink Name data type.

  • The Simulink.AliasType object has the Data scope parameter set to Exported.


Replace data type names in the generated code enables this parameter.

Command-Line Information

Parameter: ReplacementTypes, replacementName.char
Type: character vector
Value: The name of a Simulink.AliasType object, where the object exists in the base workspace.
Default: ''

Recommended Settings

DebuggingNo impact
TraceabilityA valid character vector
EfficiencyNo impact
Safety precautionNo recommendation

Related Topics