simulink_root does not have a parameter named 'PaperType'
Mostra commenti meno recenti
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 Commenti
dpb
il 24 Set 2025
Don't have Simulink but AI engine says the root 'PaperProperty' wasn't removed, but it also says recommended practice is now to query the particular model and set it for it instead...
% Get the handle to the currently active Simulink figure
h = get_param(gcs, 'Handle');
% Set figure properties before exporting
set(h, 'PaperType', 'A4');
I'd suggest trying that and seeing what happens...it does seem strange wouldn't be in the root object, though.
See if that will get you by for the time being until somebody who actually knows something comes by.
Peman
il 25 Set 2025
Peman
il 25 Set 2025
Walter Roberson
il 26 Set 2025
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
il 26 Set 2025
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Model, Block, and Port Callbacks in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!