How can I work around the warning "Some parameter values of block <blockName> are getting discarded' after upgrading to MATLAB R2023b?

2 views (last 30 days)
I am using MATLAB R2023b. I have a script "myScript" that creates a Simulink library, "myLibrary", and applies new mask parameters to the blocks. Every release of MATLAB, I run this script to create my own new version of the library. Then I take my old models and open them in the new release. However, in MATLAB R2023b, when I open one of my models, I get the warning:
Some parameter values of block 'myModel/myBlock' are getting discarded. This block is linked to 'myLibrary/myBlock'. Run the Upgrade Advisor on 'myLibrary' to check for and update such blocks.
I am concerned that some parameters of my block are lost and I do not know which ones. What is the cause of this warning, and how do I resolve it?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 2 Jul 2024
Edited: MathWorks Support Team on 2 Jul 2024
This warning appears when a block in the model is saved with one set of mask parameters, but the library that Simulink finds upon opening the model has a different set of mask parameters. When you open the model, the model takes the mask parameters in the library block and discards any mask parameters that are missing from the library. 
There are two possible workarounds to this issue:
1. Resave the model. If you save the model after getting this warning, Simulink will save the model and use the mask parameters inside the library at the top of the MATLAB path. If you close and reopen the model after saving it, the model will have the same mask parameters as the library, so there will be no warning.
2. Edit the library to make sure it has the same mask parameters as the library in the prior release. This warning is caused by the model and library having conflicting mask parameters. One possible workaround is to make sure the library has the mask parameters that the model was saved with. This requires knowing what parameters the library used in the previous release.

More Answers (0)

Categories

Find more on Modeling in Help Center and File Exchange

Products


Release

R2023b

Community Treasure Hunt

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

Start Hunting!