Simulink mask initialization commands not visible or editable in R2024b

7 vues (au cours des 30 derniers jours)
We have Simulink libraries containing subsystems that have masks, and some have mask initialization code.
These all worked fine in R2018a.
We have upgraded to R2024b and saved all libraries in R2024b format.
Now the mask initialization code for these subsystems still all WORKS, but it cannot be viewed or edited.
The mask editor GUI is different. There is a "Code" tab but it contains NOTHING and cannot be edited.
I know the mask initialization code is still there, and it can be viewed in the uncompressed .slx file with a section labelled <Initialization>.
How do we view and edit mask initialization code in R2024b?

Réponse acceptée

Aabha
Aabha le 20 Août 2025
I understand that you want to view and edit the mask initialization code, in MATLAB R2024b. Starting with the MATLAB R2023a release, MATLAB has introduced a feature for organizing mask callbacks and initialization code in a separate MATLAB file, instead of storing it in a mask object. You can find more details about this functionality in the following release notes link: https://www.mathworks.com/help/simulink/release-notes.html?startrelease=R2022a&endrelease=R2023a&rntext=mask+initialization
Additionally, please refer to the following documentation link for more details about writing mask callback code and migrating the existing initialization code to a MATLAB file: https://www.mathworks.com/help/releases/R2023a/simulink/ug/maskcallbackfile.html
I hope this helps.
  1 commentaire
Andrew Roscoe
Andrew Roscoe le 8 Sep 2025
Modifié(e) : Andrew Roscoe le 8 Sep 2025
Okay yes, thanks. We'll need to follow this migration process for quite a number of masked subsystems in a number of libraries.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Create Block Masks dans Help Center et File Exchange

Produits


Version

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by