Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: kaimeder on March 06, 2009, 08:03:17 pm
-
Hello,
using the newest .NET AddInn-dll, there is no IsComposite Property to check whether an object is Composite (Activity-composition of other Activities).
Is this unavailable? How can I check for composite-structures?
Thanks,
Kai
-
It's the Element.Subtype property which is = 8 for composite elements. In case of activities there are some more values (for loop, conditional a.s.o.), see also
http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1233666876/7#7
-
Thanks alot!
Do you also know how to get a Composite's Target/Content/Composed Element?
Thanks,
Kai
-
I've never tried it, but EA.Element has collections like Connectors, Elements or EberddedElements which should contain the stuff within it (or below it, from a project browser point of view).
-
the problem is though that such a hyperlinked/composite activity has in fact Elements.Count=0 etc... like in the project-browser, these elements have no sub-objects at all.
any hint how to get the hyperlink-target?
Thanks!
Kai
-
What is a hyperlinked activity? Or what do you mean by hyperlink-target? How do you create such a thing?
-
It's the Element.Subtype property which is = 8 for composite elements. In case of activities there are some more values (for loop, conditional a.s.o.), see also
http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1233666876/7#7
Part of the problem - Frank alludes to this regarding Activities, but I am referring to the general case - is that the documentation for the SubType attribute is incomplete, and vague where it exists.
Regarding the value for Composite setting (=8) does mention it works for a composite Activity, then goes on to say it also works for for other elements "such as Use Cases." This is not really helpful when you want to figure out exactly what EA will accept, and what will happen in each case.
The documentation goes on to say that "there are many more Types [sic] than indicated in the above examples." Once again, not helpful.
Yes, I've reported this as a documentation bug. Thus far this one has not been dealt with (to the extent necessary). I think part of the problem is that the only 'real' information is in the source code, and predates recent efforts to update the EA docs.
Sigh...
-
If you take a Diagram, drag-n-drop, hyperlink, you've got an composite activity.
I need to get the activity's target (the original diagram) where it hyperlinks to!
@Midnight: yes, the documentation ist quite *useless* on certain topics.
Thanks,
Kai
-
Hey Sparx, anyone,
any idea how to use the Automation-Interface to get Metainformation about Hyperlinked Diagram-Objects?
thanks in advance,
Kai
-
If you take a Diagram, drag-n-drop, hyperlink, you've got an composite activity.
I don't get a composite activity this way, but just a hyperlink on the diagram.
-
OK, if you got a hyperlinked diagram-object.
Do you know any way to get the target-diagram where the object is linking to?
Thanks,
Kai
-
The hyperlink on the diagram should be represented in the API by an item within the Diagram.DiagramObjects collection. And this item should be of type EA.DiagramObject and have a DiagramID property carrying the ID of the target diagram.
-
However the problem is DiagramObjects.Count == 0.
Should this work or is it actually working with the .NET Automation?
Thanks alot Frank!
Kai
-
If you have a diagram containing a hyperlink, and you're sure that you're accessing this very diagram in your code, and DiagramObjects.Count == 0, then I'd say it's a bug which you should report via the official bug report link.
-
K, gotta report it...
thanks alot!