Turn off Content Preview Enabled when creating a subsystem in simulink

12 visualizaciones (últimos 30 días)
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?

Respuesta aceptada

Terry Smith
Terry Smith el 19 de Mayo de 2022
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');

Más respuestas (1)

Fangjun Jiang
Fangjun Jiang el 5 de Mayo de 2022
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.

Categorías

Más información sobre Subsystems en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by