Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: rst9380 on February 01, 2006, 06:20:21 am

Title: All attribute list
Post by: rst9380 on February 01, 2006, 06:20:21 am
Has anybody written EA extensions to produce a list of all attributes. The attribute name is major field and will contain all attribute metadata and class names attribute are found (can be in multiple classes)?
Title: Re: All attribute list
Post by: KP on February 01, 2006, 02:19:46 pm
You could try an SQL query. This'll get you started:

select t_attribute.Name, t_attribute.Type, t_attribute.Scope, t_object.Name as [ClassName] from t_attribute, t_object where t_attribute.Object_ID = t_object.Object_ID order by t_attribute.Name
Title: Re: All attribute list
Post by: rst9380 on February 02, 2006, 05:26:26 am
Hi,
thanks for this lead.
how is this script setup?
first time to try running a script on EA metadata.

thanks,

Title: Re: All attribute list
Post by: KP on February 02, 2006, 02:49:11 pm
Quote
how is this script setup?


Outside of EA. If you're using a .EAP file, you can open it in MS Access and query it (a .EAP file is an Access .mlb file renamed). If you're using a database repository, you will need to use the DBMS's query functions. If you're writing an add-in, you can presumably use the add-in language's SQL support, if any.
Title: Re: All attribute list
Post by: Takeshi K on February 02, 2006, 09:09:34 pm
Please try following:

1. open model file
2. from Main Menu, Edit -> Find
3. press Advanced button
4. press New Search button
5. enter name
6. select SQL editor
7. press OK button
8. paste the SQL in above post by KP
9. press Save button
10. press Run Search button
11. !!!!

You can run the SQL inside EA.

--
t-kouno
Title: Re: All attribute list
Post by: KP on February 02, 2006, 09:34:43 pm
Quote
11. !!!!

You can run the SQL inside EA.


Wow, thanks Takeshi, I never knew EA could do that!  :D
Title: Re: All attribute list
Post by: thomaskilian on February 03, 2006, 01:29:13 pm
I'm in doubt now. Always thought EA has been developed down under, but obviously 't was  Made in Japan!  ;D