Simulink - automatically hide the name of a new block?
이전 댓글 표시
Hi all -
When I build Simulink models I tend to immediately hide the name of a block unless it's not obvious exactly what it's doing (and then I rename it). For instance, I will hide the name of "Gain", "Sum", etc.
Is there a setting or way to automatically hide the name of a block I drop into a model? It gets tedious to do this manually, especially as there is no keyboard shortcut to do so.
Thanks!
댓글 수: 1
Kaustubha Govind
2011년 12월 7일
How exactly do you hide the name? Do you delete the label? Or do you set it to blankspaces?
채택된 답변
추가 답변 (3개)
Simon Greenwold
2017년 11월 14일
1 개 추천
We added a feature in R2017b to automatically hide block names when the names are default. It's documented here.
Does that help?
댓글 수: 1
Robert
2023년 7월 3일
As link has changed, process in 17b onwards is: "Format" tab in simulink > "name" dropdown in BLOCK LAYOUT section > tickbox for "hide automatic block names".
Abhijit Das
2012년 3월 30일
0 개 추천
Abhishek,
Thanks for the answer and it is helpful. Although it is working only with the main simulink window but not for munsked or subsystems. Are you aware of any tip for that too?
Thanks.
Abhijit
댓글 수: 1
Abhay khemka
2019년 2월 21일
편집: Abhay khemka
2019년 2월 21일
instead of this,
set_param( blockNames{k} , 'ShowName' , 'on' );
we can make it more generalised
set_param( pathTotheBlockName , 'ShowName' , 'on'/'off' ); this should work for all subsystems and blocks...
for masked systems, refer to the link below:
https://in.mathworks.com/help/simulink/ug/control-masks-programmatically.html
also, if you are working on a big system,make sure to name blocks or subsystems in a systematic order, so that u can access all the blocks/subsystems in one loop. That will reduce lot of effort.
Robert
2018년 11월 30일
0 개 추천
If you have switched off "automatic" hide/display feature for all existing blocks, you can use
set(find_system(get_param(bdroot,'Handle'),'HideAutomaticName','on'),'HideAutomaticName','off','ShowName','off');
to hide the name of all newly added blocks of the current model.
If you need to switch off the "automatic name" in your models blocks i the first place, use
set(find_system(get_param('mymodelroot','Handle'),'HideAutomaticName','on'),'HideAutomaticName','off');
Generally switching off 'HideAutomaticName' is very useful when working with models that have to follow modelling rules such as MAAB or MISRA SLSF that do not allow spaces or line breaks that are found in most of the simulink default block names.
Best regs,
Robert
카테고리
도움말 센터 및 File Exchange에서 Subsystems에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!