This is a small tool to help in model editing in Simulink.
The tool allows to automatically align input and output ports connected to subsystems. The conditions are that the system port is not connected to other ports and the input/output port is not connected to other subsystems, i.e. a one-to-one relationship.
Aligning is applied only on selected subsystems / inports / outports. There are check boxes to assist in selection of current system's subsystems / inports / outports.
Aligning is applied on the current system, the blue area shows the result of gcs (get current system), it can be updated by a right click.
Very Useful. I have added the option to align From and GoTo Blocks also: https://uk.mathworks.com/matlabcentral/fileexchange/69049-io-tool-aligner-mk2
Hi, very useful code. I made a little improvement so that you can have it with a right click button here :
Very useful tool.
I modified on my setup so I could align my selected IO + subsystem from the right click context menu (sl_customization.m) using this callback:
%Remove parent block from selection
h_subsystems = h_subsystems(find(h_subsystems~=get_param(gcs, 'Handle')));
for i = 1:length(h_subsystems)
if (strcmp(get_param(h_subsystems(i),'Selected'), 'off'))
%taken from sliotool.m
Very useful tool, especially with complex systems.
Thanks a lot
I can't know what is the problem in your case without further details.
Make sure the system name you want to apply aligning to its elements is shown in the blue area and that the elements (subsystems and ports) are selected before clicking align.
I hope this will make it work.
Could not get it to work. Nothing happens when I click Align. Using R14sp2.
Create scripts with code, output, and formatted text in a single executable document.