issue while setting mask parameter

12 visualizaciones (últimos 30 días)
Anuj
Anuj el 30 de Oct. de 2024
Respondida: Gayatri el 30 de Oct. de 2024
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.

Respuestas (1)

Gayatri
Gayatri el 30 de Oct. de 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:

Categorías

Más información sobre Author Block Masks en Help Center y File Exchange.

Productos


Versión

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by