Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Martin Terreni on March 02, 2008, 06:15:08 pm
-
Hi to all,
My add-in needs to create elements, and since I can't upload EAs dialog for it, I need to replicate it. the problem is that I can't find a way to filer the sterotype by the selected object type.
Although there is a string in the stereotype claiming what does it apply to, it dosn't seem to fit any type name (even trimming the "ot").
Can it be that there is a bug and the types in "AppliesTo" do not mach the ObjectType strings?
-
Now I see the problem.
ObjectType<>Element type (though elemnt types ARE kept in t_objectTypes!!).
How can i get the list of element types in the repository?
-
Hi Martin,
Look at the list provided in EA Help (the SDK part) [EDIT: as well as the 'type' tables].
One thing that I trip over is that there is no object type (in the enumeration) for, say, a Use Case. That is because the API sees it as simply an element. The enumeration basically shows us the list of collections that we can work with. The Type (usually) attribute of an entity gives us more specific information.
Some elements do appear in the enumeration though. AFAIK these cases point to situations where some element (or whatever) has a collection of specific 'things' and the enumeration includes this possibility. An example would be events.
This is going to cause you some grief when you hit connectors, but you'll be able to work through it.
David
-
Just don't trust the help all the time. I remember occasions where the documentation was not really complete. I think that was with the diagram types. To be sure you can always have a look in the xxxtypes table.
-
Very true Geert,
Thanks for pointing out my omission. Correction made. :-[
David
-
I just ectracted it from t_objecttypes.
though I realy think it should be part of the repository API, just as stereotypes collection.