File Exchange

image thumbnail

Create From Blocks

version (2.84 KB) by Giacomo Faggiani
Create 'From' blocks with same appearance and properties of 'Goto' blocks selected in the model


Updated 04 Nov 2009

View License

Editor's Note: This file was selected as MATLAB Central Pick of the Week

Select your Goto Simulink block, right click and select "create From blocks".
From block will be created with same color, orientation, dimensions, font and name of corresponding Goto block.
If you have created this block by copy&paste it's probable that block name doesn't correspond to its tag, so block name will be changed according to the tag.
If one or more corresponding From blocks already exist their appearance will be updated, but no other blocks will be created.

Cite As

Giacomo Faggiani (2021). Create From Blocks (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (6)

Marwan N

I'm not able to find the user defined functions on double clicking. Any instructions?



I keep having to navigate my folder to where I have the two files located and then reinitializing the customization file to get this working. Is there a place I can store the functions so that this feature will be usable without having to navigate to the folder.

Some suggestions for any future versions:
-Allow duplications, currently it wont create a second goto tag if there is an existing one.
-Make a function where you can generate input ports, output ports, goto tag, from to tags. So in otherwords, if I select 10 Input ports, I can have it provide me goto,from, and output ports.


No Install Instructions?

Lukas Lansky

Works great.


Very useful. Makes From/Goto blocks much easier to use. I also learned that you can customize the context menu. I did not not know that.

Will Campbell

Great stuff. I'll be making regular use of this functionality! A couple suggestions for the future... I often want multiple From blocks derived from a single Goto. You might want to modify the script to permit creation of multiple Gotos (incrementing the name as you do so). You also might want to have the size of an existing From block be increased/shrunk to match the Goto block (the same way you change the font, color, etc).

MATLAB Release Compatibility
Created with R2007b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!