Enterprise Architect version 14.0

download
purchase

enzh-CNcsnlfrdehiiditkoplptruskessv

My Profile

Social Media Channels

facebook  twitter  youtube   linkedin

Friday, 18 December 2009 09:09

Create a "hyperlink" for EA elements II.

Written by
Rate this item
(0 votes)

This is a reaction for this resource http://community.sparxsystems.com/resources/community/scripts/create-hyperlink-ea-elements

where the same functionality is solved by script. I believe that using the search profile is more appropriate for the problem.

The search profile below can find any package, object, attribute, operation, diagram by given ea_GUID.

It can be given by the {261AEBEE-a0f0-4ba9-B60A-A26D663DBAFB} form or by BKM_261AEBEE_a0f0_4ba9_B60A_A26D663DBAFB form (it is used in RTF documents)

The given search string can be the whole sentence just including the GUID (you don't have to extract guid from the sentence) -- it is useful when you use messages produced e.g. by some script where you can copy only the whole line from the output view..

The search profile is for MSSQL (it can be enhanced by using #WC#  wildcard) :

select o.ea_guid AS CLASSGUID,o.name as 'NAME'
from t_package o  where o.ea_guid LIKE replace(replace(replace(SUBSTRING('%<Search Term>%',PATINDEX('%{%','%<Search Term>%'),PATINDEX('%}%','%<Search Term>%')-PATINDEX('%{%','%<Search Term>%')+1),'BKM_',''),'#',''),'_','-')
UNION
select o.ea_guid AS CLASSGUID,o.name as 'NAME'
from t_object o  where o.ea_guid LIKE replace(replace(replace(SUBSTRING('%<Search Term>%',PATINDEX('%{%','%<Search Term>%'),PATINDEX('%}%','%<Search Term>%')-PATINDEX('%{%','%<Search Term>%')+1),'BKM_',''),'#',''),'_','-')
UNION
select o.ea_guid AS CLASSGUID,o.name as 'NAME'
from t_attribute o  where o.ea_guid LIKE replace(replace(replace(SUBSTRING('%<Search Term>%',PATINDEX('%{%','%<Search Term>%'),PATINDEX('%}%','%<Search Term>%')-PATINDEX('%{%','%<Search Term>%')+1),'BKM_',''),'#',''),'_','-')
UNION
select o.ea_guid AS CLASSGUID,o.name as 'NAME'
from t_operation o  where o.ea_guid LIKE replace(replace(replace(SUBSTRING('%<Search Term>%',PATINDEX('%{%','%<Search Term>%'),PATINDEX('%}%','%<Search Term>%')-PATINDEX('%{%','%<Search Term>%')+1),'BKM_',''),'#',''),'_','-')
UNION
select o.ea_guid AS CLASSGUID,o.name as 'NAME'
from t_diagram o  where o.ea_guid LIKE replace(replace(replace(SUBSTRING('%<Search Term>%',PATINDEX('%{%','%<Search Term>%'),PATINDEX('%}%','%<Search Term>%')-PATINDEX('%{%','%<Search Term>%')+1),'BKM_',''),'#',''),'_','-')

 

 

Read 4111 times
Lubos

Lubomír Markovič

HomeCredit a.s. (Business Analyst)
 
Experience in companies developing large banking systems as designer, analyst and methodologist. Responsible for Sparx Enterprise Architect integration into company's environment and processes.

cz.linkedin.com/pub/lubomir-markovic/1/2b5/2b8
Login to post comments