主要内容

本页采用了机器翻译。点击此处可查看最新英文版本。

在视图库中切换生命线和组件

此示例展示了如何使用 架构视图库 工具中的枢轴功能,在选择生命线或组件的情况下在图之间进行转换。

1.打开交通信号灯示例,然后启动架构视图库

model = systemcomposer.openModel("TLExample");
openViews(model);

2.创建一个名为 All Components 的新视图。

view = createView(model,"All Components");

3.导入查询命名空间。添加一个查询以从模型中选择所有组件,然后将查询添加到视图中。

import systemcomposer.query.*
view.modifyQuery(AnyComponent)

4.在 All Components 组件图视图中,选择 switch 组件。

Selected switch component on the All Components view.

5.从架构视图库工具栏中的视图选项卡中,选择透视。然后,选择 PedestrianCross 序列图,从 switch 组件旋转到代表该组件的 switch 生命线。

The switch lifeline is selected on the Architecture Views Gallery in the Sequence Diagram tab.

您已从 All Components 组件图视图导航到 PedestrianCross 序列图,以与同一实体进行交互。

另请参阅

工具

函数

对象

主题