issue while setting mask parameter
    11 vues (au cours des 30 derniers jours)
  
       Afficher commentaires plus anciens
    
The "set_param" function will only update the model if the mask dialog is closed. If the mask dialog is open, the "set_param" command might not take effect, especially if the parameter is visible.
0 commentaires
Réponses (1)
  Gayatri
      
 le 30 Oct 2024
        Hi Anuj,
To modify mask parameter values, use the 'Simulink.Mask' class. 
% Get the Mask of the Subsystem
maskObj = Simulink.Mask.get('TestModel/SubSysName');
% Retrieve the Mask Parameter
paramObj = maskObj.getParameter('parameter_name');
% Set the Parameter Value
paramObj.set('Value', 'NewValue');
Please refer the below documentations for Simulink.Mast class:
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!

