Documentation

Disable or Break Links to Library Blocks

模型包括添加或结构性变化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, clickLibrary Link>Disable Link. Alternatively, select the linked block and clickDiagram>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, clickDiagram>Lock Links To Library. You can later choose to unlock the locked link by selectingDiagram>Unlock Links To Libraryon the library window.

Note

万博1manbetx®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 useset_paramto 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, seeRestore 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, selectLibrary 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 thesave_systemcommand. For more information, seesave_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

|

Was this topic helpful?