vs中查找结果视图显示改变_查找使用特定变量的块

0fce81e49bba5de3a7f2fc697edd3fd2.png

Finding Blocks That Use a Specific Variable
查找使用特定变量的块
This example shows how to use Model Explorer to get a list of blocks that use a specific workspace variable.
此示例演示如何使用模型资源管理器获取使用特定工作区变量的块列表。1 Open the model f14.
打开型号f14。2 Open Model Explorer.
开放模型资源管理器。3 In the Model Hierarchy pane, select the Base Workspace node.
在“模型层次结构”窗格中,选择“基本工作区”节点。4 In the Contents pane, right-click the variable Mq and select Find Where Used.
在“内容”窗格中,右键单击变量Mq并选择“查找所用的位置”。5 In the Select a system dialog box, select f14.
在“选择系统”对话框中,选择f14。

6 Clear the Search in referenced models check box, since f14 does not reference any models, and click OK.

清除“搜索引用的模型”复选框,因为f14不引用任何模型,然后单击“确定”。

With Search in referenced models selected, you can find the target variable everywhere it is used in a model reference hierarchy. However, finding the target variable in an entire hierarchy can take more time.

通过选择参考模型中的Search,您可以在模型参考层次结构中使用的所有地方找到目标变量。但是,在整个层次结构中找到目标变量需要更多的时间。

The Update diagram to include recent changes check box is cleared by default to save time by avoiding unnecessary model diagram updates. Select the check box to incorporate recent changes you made to the model by forcing a diagram update.

默认情况下会清除“包含最近更改的更新关系图”复选框,以避免不必要的模型关系图更新,从而节省时间。选中复选框以合并通过强制更新关系图对模型所做的最新更改。

7 Click OK in response to the message to update the model diagram.

单击OK以响应消息更新模型图。

Because you just opened the model, you must update the model diagram at least once before finding a variable. You could have selected Update diagram to include recent changes in the Select a system dialog box to force an initial diagram update, though you typically use that option when you make changes to the model while performing multiple searches with Find Where Used.

因为您刚刚打开了模型,所以在找到变量之前,您必须至少更新模型关系图一次。您可以选择Updatediagram来在Selectasystem对话框中包含最近的更改以强制进行初始图表更新,但是在使用FindWhereUsed执行多个搜索时,通常在对模型进行更改时使用该选项。

8 Model Explorer displays the search results:

模型资源管理器显示搜索结果:

b65d568634e3eb11a364a16442966463.png

The property columns whose values include Mq represent the block parameters that use the Mq variable. If those property columns are not already in the view, then the Model Explorer adds them to the end of the search results display.

值包含Mq的属性列表示使用Mq变量的块参数。如果这些属性列还没有出现在视图中,那么模型资源管理器将它们添加到搜索结果显示的末尾。

You can also find blocks that use a specific variable by using one of these approaches:

你也可以通过以下方法找到使用特定变量的块:

• In the search bar, select the for Variable Usage search type option.

在搜索栏中,选择forVariableUsagesearchtype选项。

• In the Search Results pane, right-click a variable and select the Find Where Used menu item.

在“搜索结果”窗格中,右键单击一个变量并选择“查找所用的位置”菜单项。

• In the Model Data Editor, right-click a workspace variable and select the Find Where Used menu item.

在“模型数据编辑器”中,右键单击一个工作区变量并选择“查找使用的位置”菜单项。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值