在Simulink中创建子系统时,请关闭内容预览

发布于 2025-01-26 10:25:44 字数 230 浏览 1 评论 0原文

我有一个生成子系统的脚本,我想关闭内容预览。我的脚本具有以下行:

add_block('内置/子系统',[sys'/subsystema'],'位置',[1150 100 1400 980],'attributesformattring','' ;','tag','5.0.0','contentPreviewEnabled','off');

这在R2019B中不起作用。有什么建议吗?

I have a script that generates a subsystem and I want to turn off the Content Preview. My script has the following line:

add_block('built-in/Subsystem',[sys '/subsystemA'],'Position',[1150 100 1400 980],'AttributesFormatString','Version: %<Tag>','Tag','5.0.0','ContentPreviewEnabled','off');

This is not working in R2019B. Any suggestions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

罪歌 2025-02-02 10:25:44

在创建块之后,请尝试设置contentPreviewEnabled标志。

blk = add_block('built-in/Subsystem',[sys '/subsystemA'],'Position',[1150 100 1400 980],'AttributesFormatString','Version: %<Tag>','Tag','5.0.0');
set_param(blk,'ContentPreviewEnabled','off');

我已经在R2018B和R2020A(我已经安装的内容)中尝试了您的初始命令,但无法重新创建任何问题,而内容预览未关闭。

Try setting the ContentPreviewEnabled flag after the block has been created.

blk = add_block('built-in/Subsystem',[sys '/subsystemA'],'Position',[1150 100 1400 980],'AttributesFormatString','Version: %<Tag>','Tag','5.0.0');
set_param(blk,'ContentPreviewEnabled','off');

I've tried your initial command in R2018b and R2020a (what I have installed) but was unable to recreate any issue with the content preview not being turned off.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文