5.0

5.0 | 4 ratings Rate this file 21 Downloads (last 30 days) File Size: 2.84 KB File ID: #25736
image thumbnail

Create From Blocks

by

 

Create 'From' blocks with same appearance and properties of 'Goto' blocks selected in the model

Editor's Notes:

This file was selected as MATLAB Central Pick of the Week

| Watch this File

File Information
Description

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.

Acknowledgements

This file inspired Add Simulink Blocks From A Given Model File With Context Menu.

Required Products Simulink
MATLAB release MATLAB 7.5 (R2007b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (5)
06 Jun 2013 Michael

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.

20 May 2013 Michael

No Install Instructions?

11 Jan 2011 Lukas Lansky

Works great.

07 Jan 2011 Bryan

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.

05 Jan 2011 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).

Contact us