Turn off Content Preview Enabled when creating a subsystem in simulink

조회 수: 14 (최근 30일)
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?

채택된 답변

Terry Smith
Terry Smith 2022년 5월 19일
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');

추가 답변 (1개)

Fangjun Jiang
Fangjun Jiang 2022년 5월 5일
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.

카테고리

Help CenterFile Exchange에서 Subsystems에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by