How do I print a Simulink block's mask dialog?
2 views (last 30 days)
Show older comments
Hello,
I need to print the mask dialogs of all my subsystem blocks so that I can capture the parameterization in a report. While I can print the block diagrams under masks, I need help printing the mask dialog itself, or otherwise export the mask parameter values for each block. I need this for Simulink library blocks as well as blocks I have created.
Thanks!
0 Comments
Answers (1)
Paul
on 20 Jan 2022
Here is a way to get the mask parameters for a masked block, stored in a struct with field names the parameter names and field values the parameter values.
d = get_param(gcb,'DialogParameters'); % replace gcb with the block of interest
params = fieldnames(d);
for ii = 1:numel(params)
blkparam.(params{ii}) = get_param(gcb,params{ii});
end
0 Comments
See Also
Categories
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!