Main Content

Custom comments function


Specify a file that contains comments to be included in generated code for module packing tool (MPT) signal and parameter data objects. MPT data objects are objects of the classes mpt.Parameter and mpt.Signal.

Category: Code Generation > Comments


Default: ''

Enter the name of the MATLAB® language file or TLC file for the function that includes the comments to be inserted of your MPT signal and parameter objects. You can specify the file name directly or click Browse and search for a file.


You might use this option to insert comments that document some or all of the property values of an object.

For an example MATLAB function, see the function matlabroot/toolbox/rtw/rtwdemos/rtwdemo_comments_mptfun.m.


  • This parameter only appears for ERT-based targets.

  • This parameter requires an Embedded Coder® license when generating code.

  • Custom comments (MPT objects only) enables this parameter.

Command-Line Information

Parameter: CustomCommentsFcn
Type: character vector
Value: valid file name
Default: ''

Recommended Settings

DebuggingValid file name
TraceabilityValid file name
Safety precautionNoimpact

Related Topics