Main Content

Specify custom data type names

Option to replace built-in data type names in generated code

Model Configuration Pane: Code Generation / Data Type Replacement


The Specify custom data type names parameter determines whether to replace built-in data type names in the generated code with data type names that you specify. For example, when you want to generate code that adheres to application or site standards for data type naming.

This parameter enables you to specify replacements in the generated code for:

  • Built-in data type names through the Data type names table.

  • Boolean and data type limit identifiers through the Advanced parameters section.


off (default) | on

Display the Data type names table, which enables you to change the names of built-in data types used by the generated code.

You can specify new data type names for some or all of the Simulink® built-in data types listed in the table. Specify the replacement name as one of the following:

  • A Simulink.AliasType object.

  • A Simulink.NumericType object.

  • The Simulink Name built-in data type name.

If you use a Simulink.AliasType or Simulink.NumericType object and Data type replacement is set to Use C data types with fixed-width integers, the HeaderFile object property must be set to the name of the header file that provides the type definition.

An error occurs, if:

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

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


In generated code, use Simulink Coder™ names for built-in Simulink data types.

Recommended Settings

DebuggingNo impact
EfficiencyNo impact
Safety precautionNo impact

Programmatic Use

Parameter: EnableUserReplacementTypes
Type: character vector
Value: 'on' | 'off'
Default: 'off'

Version History

Introduced in R2007a