Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: bsimon on March 31, 2005, 03:50:10 pm
-
how do I find an association class's corresponding connector using automation ?
For example I have three classes A, B, and C; C is an association class. There is an association between A and B, and C linked to association between A and B ( dotted line from C to associaion between A and B). How is it reflected in the automation model object that there is a link between association class C and connector from A to B.
-
G'day,
I don't think class C "knows" it's an association class. The connector from A to B will have connector.Subtype = "Class" and connector.Miscdata(0) set to element.ElementID of class C.
HTH,
Neil
-
The element can find the connector it is linked to. The connector ID is in element.MiscData(3).
-
Thanks Simon. A small caveat though: if rather than dragging an association class from the toolbox, you right-click an existing class and link it to an association, Miscdata(3) isn't updated until you save the diagram changes. At least, that's my excuse for not noticing it :-[