Main Content

Check model before generating code

Choose whether to run Code Generation Advisor checks

Model Configuration Pane: Code Generation

Description

The Check model before generating code parameter specifies whether to run Code Generation Advisor checks before initiating code generation.

Settings

Off (default) | On (proceed with warnings) | On (stop for warnings)
Off

Generates code without checking whether the model meets code generation objectives. The code generation report summary and file headers indicate the specified objectives and that the validation was not run.

On (proceed with warnings)

Checks whether the model meets code generation objectives by using the Code Generation Objectives checks in the Code Generation Advisor. If the Code Generation Advisor reports a warning, the code generator continues producing code. The code generation report summary and file headers indicate the specified objectives and the validation result.

On (stop for warnings)

Checks whether the model meets code generation objectives by using the Code Generation Objectives checks in the Code Generation Advisor. If the Code Generation Advisor reports a warning, the code generator does not continue producing code.

Recommended Settings

ApplicationSetting
DebuggingOn (proceed with warnings) or On (stop for warnings)
TraceabilityOn (proceed with warnings) or On (stop for warnings)
EfficiencyOn (proceed with warnings) or On (stop for warnings)
Safety precautionOn (proceed with warnings) or On (stop for warnings)

Programmatic Use

Parameter: CheckMdlBeforeBuild
Type: character vector
Value: 'Off' | 'Warning' | 'Error'
Default: 'Off'

Version History

Introduced in R2009a