'Turn off Content Preview Enabled when creating a subsystem in simulink
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?
Solution 1:[1]
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | scotty3785 |
