Main Content

Maximum identifier length


Specify maximum number of characters in generated function, type definition, variable names.

Category: Code Generation > Identifiers


Default: 31
Minimum: 31
Maximum: 256

You can use this parameter to limit the number of characters in function, type definition, and variable names.


  • Consider increasing identifier length for models having a deep hierarchical structure.

  • When generating code from a model that uses model referencing, the Maximum identifier length must be large enough to accommodate the root model name, and possibly, the name-mangling text. A code generation error occurs if Maximum identifier length is too small.

  • This parameter must be the same for both top-level and referenced models.

  • When a name conflict occurs between a symbol within the scope of a higher level model and a symbol within the scope of a referenced model, the symbol from the referenced model is preserved. Name mangling is performed on the symbol from the higher level model.

Command-Line Information

Parameter: MaxIdLength
Type: integer
Value: valid value
Default: 31

Recommended Settings

DebuggingValid value
EfficiencyNo impact
Safety precaution>30

Related Topics