Hi Zuyuan,
I encountered the following issues while trying to remove labels from the output signals of a ‘Bus Selector’ block in Simulink:
- The task was repetitive, as each signal label needed to be deleted individually.
- Labels would reappear upon updating the diagram.
- Signal names in a Simulink ‘Bus Selector’ block are read-only, preventing direct renaming through programs.
To make the labels of the output signals of a Simulink ‘Bus Selector’ block invisible, I set the font size of the respective lines to 0. Following is the workaround that worked for me.
- Select all output signals of the Bus Selector by dragging over the lines.
- Execute the following MATLAB code:
selectedLines = find_system(currSystem, 'FindAll', 'on', 'Type', 'Line', 'Selected', 'on');
for i = 1:length(selectedLines)
set_param(selectedLines(i), 'FontSize', 0);
This approach effectively hides the labels by setting their font size to zero.