I found out all the mask blocks in my model. Now how to remove these masks?
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I found out all the mask blocks in my model by using the command.
find_system('model_bame','LookUnderMasks','All','Mask','on','Type','block');
Now how can i remove these masks?
0 commentaires
Réponses (1)
Akshat
le 30 Sep 2023
Modifié(e) : Akshat
le 30 Sep 2023
I understand that you want to remove masks from your model. The command stated by you in the question determines all the mask blocks and returns the output in form of a 'cell' array. With this information in hand, we can leverage the 'set_param' function to remove the masks. To demonstrate my approach, I am considering a shipped model which can be opened by executing the following command in the MATLAB command window.
>> openExample('simulink_masking/DrawMaskIconDrawingCommandsExample')
>> slexMaskDrawingExamples
The above model comprises of 8 mask blocks which can be verified from the output of the following command.
>> allMasks = find_system('slexMaskDrawingExamples','LookUnderMasks', ...
'All','Mask','on','Type','block')
allMasks =
8×1 cell array
All the masks in the model can be deleted by utilizing the 'set_param' function. Here is a code snippet for reference.
% iterate over all masks in model
for i=1:length(allMasks)
set_param(allMasks{i},'Mask','off') % deelte masks
end
save_system('slexMaskDrawingExamples');
I hope this helps.
0 commentaires
Voir également
Catégories
En savoir plus sur Author Block Masks dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!