Author Topic: association class and connectors  (Read 4553 times)

bsimon

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
association class and connectors
« 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.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: association class and connectors
« Reply #1 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
The Sparx Team
[email protected]

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: association class and connectors
« Reply #2 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).

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: association class and connectors
« Reply #3 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  :-[
The Sparx Team
[email protected]