Turn off Content Preview Enabled when creating a subsystem in simulink

0
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?

 Accepted Answer

The workaround would be to add another line after the add_block line and change the property that way. The basic syntax would be:
set_param('PathToYourSubsystem','ContentPreviewEnabled','off');

More Answers (1)

When you add the Subsystem block, it is empty (no contents). I guess maybe due to that, 'ContentPreviewEnabled' can't be set as 'off'.
If adding a subsystem block with contents (e.g source block being a subsystem block in another model), 'ContentPreviewEnabled' can be set as 'off' in one command.

Products

Release

R2019b

Community Treasure Hunt

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

Start Hunting!