simulink_root does not have a parameter named 'PaperType'

조회 수: 5 (최근 30일)
Peman
Peman 2025년 9월 24일
댓글: Peman 2025년 9월 26일
My code is using the following to set the paper type for Simulink. Howerver, I am getting the following error: simulink_root does not have a parameter named 'PaperType'.
set_param(0,'PaperType','A4'); % Simulink
Note: A similar command is used on the line before to set the paper type for MATLAB and that one works (see below). Also the same code runs on R2011b but it fails on R2025b after conversion.
set(0,'DefaultFigurePaperType','a4'); % Matlab
  댓글 수: 5
Walter Roberson
Walter Roberson 2025년 9월 26일
By the way, for set_param(0,'PaperType','A4')
R2018a reported
Warning: Clearing the current default model template so that new models will inherit this property of the root block diagram. To restore the default
model template call Simulink.defaultModelTemplate('$restore') or restart MATLAB. For more information, see the documentation.
Peman
Peman 2025년 9월 26일
Thank you, Walter. This is helpful information. I very much appreciate you contributing to my historical building of this parameter from R2011b to R2025b.

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2025년 9월 26일
R2022b reports
Warning: Getting parameter 'PaperType' of the default block diagram will not be supported in a future release.
Warning: Setting parameter 'PaperType' of the default block diagram will not be supported in a future release because new models inherit parameter values from templates.
Warning: Clearing the current default model template so that new models will inherit this property of the root block diagram. To restore the default model template call Simulink.defaultModelTemplate('$restore') or restart MATLAB. For more information, see the
documentation.
By R2023b, the facility was gone.
  댓글 수: 1
Peman
Peman 2025년 9월 26일
Fantastic, this is exactly the historical data I needed. Thanks a lot, Walter!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Model, Block, and Port Callbacks에 대해 자세히 알아보기

제품


릴리스

R2025b

Community Treasure Hunt

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

Start Hunting!

Translated by