View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Redraw lines in simulink v1

5.0 | 1 rating Rate this file 3 Downloads (last 30 days) File Size: 1.25 KB File ID: #34237 Version: 1.0

Redraw lines in simulink v1


Thijs (view profile)


This simple function redraws the lines in (the top level) simulink.

| Watch this File

File Information

For each block in the simulink diagram, it finds the inports. For each inport the function searches for the corresponding source port.

it deletes the line, then redraws it using either autorouting on or off.


This file inspired Simulink Manipulation Utilities.

Required Products Simulink
MATLAB release MATLAB 7.13 (R2011b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
30 Jul 2015 jun hua

where can I get more info about SrcPortHandle and DstPortHandle? I even can't find them in matlab help file.

14 Mar 2012 Thijs

Thijs (view profile)

Mostly yes, I personally used it when automatically generating simulink models. depending on the complexity of the model I found it usefull to switch between autorouting on or off. In a simpel model 'off' resulted in the best look, but in slightly more complex ones that resulted in a spider web like tangle of lines, in this case the orthogonal look using autorouting was better looking.

I also use it when I forget my mouse, and have to rely on a mousepad, as it can be difficult to connect the lines neatly if one source block is connected to multiple destinations (i.e. when you cant use ctrl+click to quickly connect blocks).

Comment only
14 Mar 2012 K E

K E (view profile)

What is the reason that one would redraw the lines? To clean up the block diagram?

Comment only

Contact us