How do I prevent Simulink 7.4(R2009b) from showing parameterized link warnings when loading/saving my model?

1 view (last 30 days)
I have a Simulink model, which contains intentional parameterized links. When I save or load my model the following warnings are shown in the MATLAB Command Window:
Warning: Block diagram 'mymodel' contains one or more parameterized library links. To find the parameterized links use
the Model Advisor. The diagram has been saved but may not behave as you intended.
Warning: "mymodel/myblock" is a parameterized link. To view, discard, or propagate the changes for this link, use the
"Link Options" menu item
In general\private\openmdl at 13
In open at 155
In uiopen at 196
As the parameterized links are intentional, I would like to know how I can suppress these warnings.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 9 May 2013
In order to avoid these warnings from being shown, you can use the MATLAB WARNING function to explicitly turn on or off certain warnings. In order to do so for the parameterized link warnings you can use the following lines of code:
warning off Simulink:SL_SaveWithParameterizedLinks_Warning
warning off Simulink:SL_LoadMdlParameterizedLink
Please note for R2013a the following warning idenifiers should be used:
warning off Simulink:Engine:SaveWithParameterizedLinks_Warning
warning off Simulink:Commands:LoadMdlParameterizedLink
In order to make this happen for only one specific model, you could consider including warning on/off statements in your models PreLoadFcn, PostLoadFcn, PreSaveFcn and PostSaveFcn callback functions.
If the above warning IDs, do not resolve the issue, you can use the following MATLAB command to retrieve the ID of the last warning message:
[msgstr,msgid]=lastwarn
You can then use the actual 'msgid' with the WARNING command to turn off the warnings.
  1 Comment
Naz
Naz on 31 Dec 2015
Ok. But the message also contains the phrase "The diagram has been saved but may not behave as you intended." How do I make sure it behaves is I want? What exactly means "parameterized" links?

Sign in to comment.

More Answers (0)

Categories

Find more on MATLAB in Help Center and File Exchange

Products


Release

R2009b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!