How do I print a Simulink block's mask dialog?
2 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Paul
2022 年 1 月 20 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Subsystems についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!