Guy on Simulink

Simulink & Model-Based Design

Another Good Reason to Use Simulink Projects

本周我发现了一个超级有用的功能金宝app仿真软件项目

重命名图书馆

如果您正在使用金宝appSimulink库to componentize your models, you very likely ran into the following situation at some point.

您可以创建一个库块,并在模型中使用该块:

使用库块

一段时间后,您决定需要重命名库文件。下次您打开模型时,这就是您得到的:

找不到图书馆

Here are a few ways to deal with that, depending on how your library block is used.

选项1-手动更新

让我们从最明显的一个开始。If your library subsystem is used only once in one model, the quickest solution is probably to simply double-click on the missing link block and type the new name of the library:

找不到图书馆

选项2-转发表

如果您的库被数百或数千用户使用,则绝对应该使用转发表。我写了一个有关此主题的博客文章一段时间以前,我不会在这里详细介绍。

For this post, let's just say that Forwarding Tables give you all the flexibility you need when re-organizing libraries, but requires some work to implement. I typically implement it only when I know many other users will be affected by the re-organization.

转发表

选项3-仿真项目金宝app

如果您正在从事一个项目,其中各种与项目相关的模型中使用了多次使用的库块,那么您会喜欢此功能。

当您的所有模型和库都在Simulink项目中,如果您重命名库文件,则该项目将自动运行依赖金宝app关系分析,并为您提供更新库中块的所有实例。

重命名库

更新链接

只需单击重命名和更新,魔术发生了,现在所有模型都使用了更名的库:

使用更名库的模型

Now it's your turn

您已经利用此功能了吗?您首选的管理图书馆重组的方法是什么?在下面的评论中让我们知道。

|

Comments

要发表评论,请单击here登录您的数学帐户或创建一个新帐户。