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 | errornoneThe software refreshes the Model block.
warningThe software displays a warning and refreshes the Model block.
errorThe 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.refreshfunction.
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
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | No recommendation |
Programmatic Use
Parameter:
ModelReferenceVersionMismatchMessage |
Value:
'none' | 'warning' |
'error' |
Default:
'none' |