This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Disable or Break Links to Library Blocks

Structural changes in a model include addition or deletion of blocks or adding ports while non-structural changes include changes in parameter value.

A linked block does not allow structural changes to it. You can disable the link of a linked block from its parent library block and perform required modifications. A disabled linked block behaves like a local instance of a block and allows you to make structural and nonstructural changes.

To disable a link, right-click the linked block and, on the context menu, click Library Link > Disable Link. Alternatively, select the linked block and click Diagram > Library Link > Disable Link

To prevent unintentional disabling of a linked block, you can lock its links to the library. To lock a link, on the library window, click Diagram > Lock Links To Library. You can later choose to unlock the locked link by selecting Diagram > Unlock Links To Library on the library window.

Note

Simulink® offers to disable the library links (unless the link is locked) when you try to make structural changes to a block that contains active library links.

Do not use set_param to make structural changes to an active link. The result of this type of change is undefined.

A disabled link of a linked block can be restored. For more information, see Restore Disabled or Parameterized Links.

Break Links

You can permanently break links to the parent library. Before you break a library link, the link must first be disabled. When you break a link, the linked block is converted to a standalone block.

To break a link, use any of these options:

  • For disabled links, right-click the linked block and, in the context menu, select Library Link > Break Link.

  • To copy and break links to multiple blocks simultaneously, select multiple blocks and then drag. The locked links are ignored and not broken.

  • When you save the model, you can break links by supplying arguments to the save_system command. For more information, see save_system.

Note

  • Some models can contain blocks from third-party libraries or optional Simulink block sets. Breaking the link for such models does not guarantee that you can run the model standalone. It is possible that a library block invokes functions supplied with the library and hence can run only if the library is installed on the system running the model.

  • Breaking a link can cause a model to fail when you install a new version of the library on a system. For example, if a model block invokes a function that is supplied from a library. If you break the link for such a block, the function can no longer be invoked from the model, causing simulation to fail. To avoid such problems, avoid breaking links to libraries.

See Also

|