有没有一种方法可以在Sparx Enterprise Architect中搜索元素类型? [英] Is there a way to search for an element type in Sparx Enterprise Architect?

查看:83
本文介绍了有没有一种方法可以在Sparx Enterprise Architect中搜索元素类型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在模型搜索功能中似乎没有一种方法可以将结果限制为特定类型,例如类,节点等。有没有办法实现?我知道我可以制作SQL查询,但是无法找到正确的表名。

There doesn't appear to be a way in the model search feature to limit results to a specific type e.g. Class, Node, etc. Is there a way to achieve this? I know I can craft a SQL query however an unable to find the correct table name.

编辑

看来我可以执行以下操作

It appears that I can do the following

选择*,Object_Type AS CLASSTYPE,t_object中的名称,其中Object_Type = Node

Sparx似乎没有记录 Object_Type ,因为它显示为在他们的文档中输入

It seems that Sparx don't appear to have documented Object_Type as it displays as Type in their documentation.

推荐答案

没有标准的方法可以缩小生成的结果

There is no standard way of narrowing the results of a built-in search by entering something in the Search Term box.

如果使用查询生成器创建搜索,则可以指定搜索仅返回某些类型的元素。在添加过滤器对话框中,元素类型称为 ObjectType

If you create a search using the Query Builder, you can specify that the search should only return elements of certain types. In the Add Filters dialog, the element type is referred to as ObjectType.

可以使用SQL字符串操作函数来实现SQL查询,该SQL查询根据您确定的某些语法将< Search Term> 分解为多个部分,从而允许您同时指定名称和元素类型,例如(但没有内置搜索可以执行此操作)。使用查询生成器是不可能的。

It is possible to utilize SQL string manipulation functions to implement an SQL query which breaks down the <Search Term> into parts according to some syntax you decide on, allowing you to specify both a name and an element type, say (but none of the built-in searches do this). This is not possible using the Query Builder.

如果您创建了自己的SQL搜索查询,如上所述, t_object.Object_Type 包含元素的类型。

If you create your own SQL search query, as you've noted, t_object.Object_Type contains the element's type.

关于文档,只有未说明的数据库模式。您引用的 Type 字段来自对象模型API,在该API中,该属性的确称为Type。

Regarding the documentation, it's only the database schema that is undocumented. The Type field you refer to is from the Object Model API, and in that API, the attribute is indeed called Type.

此外,API中的所有类均包含属性 ObjectType ,该属性标识数据类型。这些值来自 ObjectType 枚举类型,包括 otAttribute otDiagram otElement otRepository

In addition, all classes in the API contain an attribute ObjectType, which identifies the data type. These values are from the ObjectType enumeration type, and include otAttribute, otDiagram, otElement, otRepository, etc.

这篇关于有没有一种方法可以在Sparx Enterprise Architect中搜索元素类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆