Guy on Simulink

Simulink & Model-Based Design

Automatic Refresh of Links and Model Blocks 2

Posted by Guy Rouleau,

The first time I tried editing models componentized with library blocks and referenced models in R2012a, I noticed something was different...

... and I really like that change!

What's new

In R2012a, Simulink automatically refreshes links and model blocks. Yes, you heard me, no longer need to manually select Edit > Links and Model Blocks > Refresh for your model to realize a change in a library or model block.

Here's how it works.

Model Block

Before R2012a, when changing the number of ports of a referenced model, you had to manually select Edit > Links and Model Blocks > Refresh for the Model block to update its ports. In R2012a, saving the referenced mode automatically updates the parent block:

Automatic update of model block

Library Blocks

When you edit a library block, Simulink indicates stale links by displaying the linked blocks grayed out. When you click in the model, as soon as the window becomes active Simulink refreshes any stale links with what is in the library, even if you have not saved the library yet.

Automatic update of library blocks

Now it's your turn

Try this new behavior and let us know if you are as happy as I am by leaving a comment here.

2 CommentsOldest to Newest

pk replied on : 2 of 2

hi I have created a no of library blocks and arranged them in sub-folders, then in main folder created a new main library where I dragged in the library blocks from the sub folders and arranged them in desired architecture, and the created a slblock.m file for the main library to add it to the simulink library browser. Then added the main folder along with subfolders to matlab path. when I drag one of the library block from library browser to a model and make changes and update the changes to root library, it do make changes to that individual lib block but do not update in the browser or the main library where we accumulated all lib blocks. it only updates the browser and main lib when i reopen matlab.
I also tried to run slblocks.m by itself after making changes to lib but still it does not update the browser.

Add A Comment

Your email address will not be published. Required fields are marked *


Preview: hide