Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: bsimon on March 31, 2005, 03:50:10 pm

Title: association class and connectors
Post 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.
Title: Re: association class and connectors
Post by: KP on March 31, 2005, 04:09:01 pm
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
Title: Re: association class and connectors
Post by: Eve on March 31, 2005, 05:16:52 pm
The element can find the connector it is linked to.  The connector ID is in element.MiscData(3).
Title: Re: association class and connectors
Post by: KP on March 31, 2005, 05:50:42 pm
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  :-[