Restore Disabled Links
You can restore a disabled linked block or push a linked block value to the parent library block either individually or hierarchically.
Restore Disabled Links Individually
When you push or restore a disabled block in individual mode, the disabled or edited block is pushed to or restored from the library, preserving the changes inside the block without acting on the hierarchy. All other links are unaffected. You can restore or push individual disabled blocks in three ways:
Select the disabled linked block and in the Simulink toolstrip, on the Subsystem Block tab, select Push Link or Restore Link.
Right-click a disabled linked block and from the context menu, select Library Links and click Push Link to push the changes or Restore Link to restore the values from the parent library block.
Right-click the link badge on the bottom-left corner of a disabled linked block and from the context menu, click Push Links to push the changes or Restore Link to restore the values from the parent library block.
Restore Disabled Links Hierarchically
When you push or restore disabled links in the hierarchy mode, the operation is applied to the whole hierarchy of links. To push or restore in hierarchy mode, use the Library Link Manager tool. The Library Link Manager displays all the disabled and parameterized linked blocks in the model.
You can launch the Library Link Manager in two ways:
In the Simulink toolstrip, on the Modeling tab, under the System Design section, click Library Link Manager.
Select any disabled linked block and in the Simulink toolstrip, on the Subsystem Block tab, click Library Link Manager.
The Library Link Manager window appears. It has two tabs showing disabled Links and parameterized links in the model. By default, the Disabled Links tab is selected.
The table shows two columns where the Linked Block column displays the list of linked blocks that have disabled links and the Library Block column displays the parent library block of the corresponding linked blocks.
To push or restore disabled blocks,
Select the disabled block or blocks as per your requirement.
Click Push to replace the version of the block in the library with the version in the model or Restore to replace the version of the linked block in the model with the version in the library.
You can use the Filter Blocks field to filter the displayed linked blocks based on your preference. This is useful when you have a huge number of blocks in the model.
Pushing or Restoring Link Hierarchies
Pushing a hierarchy of disabled links affects the disabled links inside and outside the hierarchy for a given link. If you push changes from a disabled link in the middle of a hierarchy, the inside links are pushed and the outside links are restored if unchanged. This operation does not affect outer (parent) links with changes unless you also explicitly selected them for push. The Library Link Manager starts to push from the lowest inside links and then moves up in the hierarchy.
Link A contains link B and both have changes.
Push A. The Links Tool pushes both A and B.
Push B. The Links Tool pushes B and not A.
Link A contains link B. A has no changes, and B has changes.
Push B. The Links Tool pushes B and restores A. When parent links are unmodified, they are restored.
If you have a hierarchy of parameterized links, the Library Links Manager can manipulate only the top level.
To compare files and view structural changes, in the Modeling tab, select Compare > Compare Models.