Main Content

Model block version mismatch

(To be removed) Diagnostic action to take when Model block does not represent current version of referenced model

Model Configuration Pane: Diagnostics / Model Referencing

The Model block version mismatch configuration parameter will be removed in a future release. Model block refreshes will not trigger diagnostics instead. For information on updating your code, see Version History.

Description

The Model block version mismatch configuration parameter determines the diagnostic action to take when loading or updating this model and the version of the model used to create or refresh a Model block does not match the current version of the referenced model.

Version mismatches can occur when you modify, save, and close a referenced model while the model that references it is not loaded. For more information, see Manage Model Versions and Specify Model Properties.

Set Configuration Parameter for Referenced Models

In a model reference hierarchy, whether you edit the parameter in the top model or the current referenced model depends on how you access the Configuration Parameters dialog box.

  • Top model in the current model hierarchy — In the Simulink® Toolstrip, on the Modeling tab, click Model Settings.

  • Current referenced model — In the Simulink Toolstrip, on the Modeling tab, click the Model Settings button arrow. Then, in the Referenced Model section, select Model Settings.

Alternatively, open the referenced model as a top model. Then, in the Simulink Toolstrip, on the Modeling tab, click Model Settings.

Settings

none (default) | warning | error
none

The software refreshes the Model block.

warning

The software displays a warning and refreshes the Model block.

error

The software displays an error message and does not refresh the Model block.

When you receive an error related to a Model block version mismatch, you can manually refresh the Model block. Select the Model block. Then, on the Model Block tab, select Refresh. Alternatively, use the Simulink.ModelReference.refresh function.

Tips

Model block icons can display a message indicating version mismatches. To enable this feature, from the parent model, on the Debug tab, select Information Overlays > Ref. Model Version. The Model block displays a version mismatch, for example: Rev:1.0 != 1.2.

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precaution

No recommendation

Programmatic Use

Parameter: ModelReferenceVersionMismatchMessage
Value: 'none' | 'warning' | 'error'
Default: 'none'

Version History

Introduced before R2006a

collapse all