Why am I unable to change the Simulink 5.0 (R13) Font Preferences default settings?

1 view (last 30 days)
The Simulink model I am using was created in a previous release. This model uses monospaced font as its default. When I open this model in Simulink 5.0 (R13), the font is not displayed as expected.
I then tried going to the Simulink Font Preferences page (File ---> Preferences) from my model and changing the font to 'Monospaced'. But when I go back to check the font setting, it has reset itself back to 'Courier New' (the default) and not 'Monospaced' as I had chosen. I also tried changing the font size, but with the same results.
How can I correctly set the font and font size for a Simulink model in R13?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 9 May 2012
This bug has been fixed for Release 14 (R14). For previous releases, please read below for any possible workarounds:
This is a bug in the Simulink 5.0 (R13) preferences. It has been reported to our development staff to be investigated. To work around this issue for a specific model, type the following commands in the MATLAB command window:
set_param(gcs,'DefaultBlockFontSize','24') %Will change the Font Size to 24
set_param(gcs,'DefaultBlockFontName','Monospaced') %Will change the Font Type
where gcs is your currently open Simulink model (ie; untitled.mdl).
To make the change permanent for all new models you create, run the same command with one change as follows:
set_param(0,'DefaultBlockFontSize','24') %Will change the Font Size to 24
set_param(0,'DefaultBlockFontName','Monospaced') %Will change the Font Type
Notice that I have replaced the first input to SET_PARAM, gcs, with 0 (zero). This command will apply these new settings to all new models.

More Answers (0)

Categories

Find more on Programmatic Model Editing in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!