Sparx Systems Forum
Enterprise Architect => General Board => Topic started by: crd on September 22, 2012, 07:19:31 am
-
Was wondering if someone would help me figure out how to write 2 queries:
1. Identifying Model that Project Browser selected package is in?
2. Identifying all the elements of a particular object type and stereotype within that selected model.
Am I just missing something that is easy? Would appreciate your thoughts.
Thanks isn advance,
Carol
-
1. what?
2. SELECT
o.ea_guid As CLASSGUID, o.Object_type As CLASSTYPE, o.name, o.Object_type As Type, o.Stereotype
FROM
t_object o, t_package pkg
WHERE
pkg.Package_id in (#Branch#)
AND o.Package_ID = pkg.package_id
AND o.Stereotype = 'thestereotype'
AND o.Object_type = 'thetype'
I haven't verified 2. but taken a sample from my book and cutting parts away.
q.
-
1. Ha! Let me try again. I want to identify the root node for the selected package.
2. Thank you. I need to roll up my sleeves and get a handle on the #xxx# that are available in EA. Totally stupid question on a Saturday morning - with not enough coffee in me. If I am writing against the API in a MS Word macro are the #xxx# available to me?
Thanks!
Carol
-
Nope, you have to recurse throught the packages youself.
Take a look at this thread: http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1347356168/1#1