Borrar filtros
Borrar filtros

Change Simulink window title

2 visualizaciones (últimos 30 días)
Daniel H
Daniel H el 19 de En. de 2016
Respondida: Matthew el 19 de En. de 2016
http://undocumentedmatlab.com/blog/accessing-the-matlab-editor shows how to set the window title of the Editor:
desktop = com.mathworks.mde.desk.MLDesktop.getInstance;
jEditor = desktop.getGroupContainer('Editor').getTopLevelAncestor;
jEditor.setTitle('This is the Matlab Editor');
I want to change the title of Simulink. I tried getGroupContainer('Simulink') etc. without luck.
How can I do this?
Thanks!

Respuesta aceptada

Matthew
Matthew el 19 de En. de 2016
The reason you can't get the simulink using the same methods as , is that its actually a DAStudio object, rather than a java container.
That said, in 2013b I'm able to change the name of the simulink window using
aStudio = DAS.Studio; %Get a blank studio;
allStudios = aStudio.getAllStudios; %Find all the studios currently open
allStudios{1}.getStudioTitle %This is the current name of the first studio
allStudios{1}.setStudioTitle('This is the new Studio name')
I don't know if the calls change in later/earlier versions, so you may have to mess around with it yourself.
In addition, most of the credit for this answer goes to Yair Altman & Donn Shull

Más respuestas (0)

Categorías

Más información sobre Simulink Functions en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by