Set pop-up mask content from file
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi,
Is there a way to set the content of a subsystem mask element (popup type) externally? Like from an M file or similar?
Many thanks in advance!
0 commentaires
Réponses (1)
Fangjun Jiang
le 1 Juil 2011
Use get() and set() command.
Drag and drop a Subsystem block to a model, type the following line in the command window.
set_param(gcb,'Mask','on','MaskPromptString', 'ParaA|ParaB','MaskStyleString', 'popup(choice1|choice2),edit','MaskVariables','A=@1;B=@2;')
And double click the Subsystem block to see effect.
Best approach is to do reverse-engineering to figure out the detailed syntax. Do the masking manually, go to command window and run get(gcbh) to see the change.
2 commentaires
Fangjun Jiang
le 13 Juil 2011
gcb is Get Current Block. type help gcb to find out
gcbh is Get Current Block Handle. type help gcbh to find out.
The command is to use set_param() to set the masking parameters of the block.
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!