How do you set the default annotation properties?

9 vues (au cours des 30 derniers jours)
glentall
glentall le 9 Jan 2018
Commenté : Walter Roberson le 10 Jan 2018
I recently migrated to a newer version of Matlab/Simulink. In the old version, the default annotation "HorizontalAlignment" was "center." In the newer version, the default is "left." How can I change my global defaults so that the annotation "HorizontalAlignment" property is "center" again?

Réponses (1)

Walter Roberson
Walter Roberson le 9 Jan 2018
Modifié(e) : Walter Roberson le 9 Jan 2018
set(groot,'defaultTextHorizontalAlignment', 'center')
You will want to put this into your startup.m
  2 commentaires
glentall
glentall le 10 Jan 2018
Modifié(e) : glentall le 10 Jan 2018
Thank you for your response Walter.
I successfully added the command you suggested to the startup.m file and verified that the command was executed when I started up Matlab (I added a disp command right after the set command and displayed a message indicating that the startup.m file had been run).
I then added a new annotation text to my Simulink model and the text alignment was still set to "left." Here is the entry for the new annotation text from the saved .mdl file:
Annotation {
SID "10013"
Name "Annotation Test"
Position [7825, 4106, 7894, 4121]
AutoSize on
WordWrap off
HorizontalAlignment "left"
VerticalAlignment "top"
}
The command was accepted by Matlab without error but I don't know what it actually changed.
Do you have any other ideas? Are the default values of the "annotation" object in a library template or something?
I've been searching on the Matlab help and doing internet searches and have not been able to find any documentation yet (it has been frustrating).
I am running Matlab R2013b and my previous version (that had the default annotation text alignment set to "center") was R2010bSP1.
Thanks again!
Walter Roberson
Walter Roberson le 10 Jan 2018
Sorry, I do not know anything about how Simulink creates annotations.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Programmatic Model Editing dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by