Main Content

Connected annotations in block comments

Include connected annotations as custom comments in generated code

Since R2024b

Model Configuration Pane: Code Generation / Comments

Description

Insert annotations connected to blocks as comments in the generated code.

Annotations not connected to model elements, including area annotations, do not render as comments. Text formatting and images in annotations also do not appear in comments. Annotations converted to markups appear in comments even if hidden. See Hide Annotations.

Settings

off (default) | on
On

Include connected annotations as comments in the generated code.

Off

Do not include connected annotations as comments in the generated code.

Recommended Settings

ApplicationSetting
DebuggingOn
TraceabilityOn
EfficiencyNo Impact
Safety precautionNo Impact

Programmatic Use

Parameter: AnnotationsInComments
Type: character vector
Values: 'on' | 'off'
Default:'off'

Version History

Introduced in R2024b