Book a Demo

Author Topic: Model Search & Connectors  (Read 3570 times)

Drops

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Model Search & Connectors
« on: June 18, 2012, 05:46:34 pm »
How do I find connectors with a specific name or tagged value without the need of SQL code?
Why is the model search for elements only?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Model Search & Connectors
« Reply #1 on: June 18, 2012, 09:40:14 pm »
I'm afraid the only way to search for connectors is by using an SQL search.
Try this:
Code: [Select]
select c.ea_guid as CLASSGUID, c.Connector_Type as ClassType, isnull(c.name,source.name + '.' + target.name) as Name, source.Name as ClassName ,package.name as PackageName ,package_p1.name as PackageLevel1,package_p2.name as PackageLevel2,package_p3.name as PackageLevel3
from t_connector as c
inner join t_object as source on (c.Start_Object_ID = source.Object_ID)
inner join t_object as target on (c.End_Object_ID = target.Object_ID)
inner join t_package as package on (source.package_id = package.package_id)
left join t_connectortag ct on c.Connector_ID = ct.ElementID
left join t_package as package_p1 on (package_p1.package_id = package.parent_id)
left join t_package as package_p2 on (package_p2.package_id = package_p1.parent_id)
left join t_package as package_p3 on (package_p3.package_id = package_p2.parent_id)
where c.name like '#WC#<Search Term>#WC#'
or ct.Property like '#WC#<Search Term>#WC#'

Geert

rayt

  • EA User
  • **
  • Posts: 28
  • Karma: +1/-0
    • View Profile
Re: Model Search & Connectors
« Reply #2 on: June 19, 2012, 11:41:45 pm »
If you often need to look up connectors in diagrams, you can use
Code: [Select]
select source.ea_guid as CLASSGUID..instead of
Code: [Select]
select c.ea_guid as CLASSGUID..in Geert's code above

This associates the result line with the start object so find in diagrams will work (It doesn't work with connector ea_guids).
Note then however, properies will show the properties of the start object also.
« Last Edit: June 19, 2012, 11:44:23 pm by rayt »