Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Stefan Christoph on October 28, 2010, 02:27:08 am
-
Hi,
I'm right now looking at possibilities to access an elements operation. I can access the element (in this case a component which comes with a couple of operations defined on it) and can access interfaces, parts, etc attached to it via Element.Elements / Element.EmbeddedElements.
Up to know, i couldn't find a way to access the operations. I would like to read all defined operations and also to modify/add operations.
Is this possible via the EA Object Model? Or do I need to access DB directly?
Cheers,
Stefan
-
Hi again,
that was a rather easy question - I can now even answer myself ;-)
Operation are called Methods on the API level - which fits to the UML notion - and come with an API. Best way to start is the nice script example: ManageAttributesMethodsExample
Follow up question would be, if it is possible to read external files from a automation script. I would like to generate/update operations based on a input file. Is this something I could do if I execute my script from within EATool or do I need to chose an external runtime environment?
Cheers,
Stefan
-
and again a little bit more searching would have helped:
http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1277431606/7#7
So it is possible and working for me as well.
Sorry for bothering you guys ..
Cheers,
Stefan
-
Operation are called Methods on the API level - which fits to the UML notion -
Stefan,
UML uses the term "Operation" as well. Method is used in UML as the behavior implementing the operation.
The term "Method" in the API is just plain wrong and should be "Operation".
Geert