Book a Demo

Author Topic: Auto Generate Class Diagram from Sequence Diagram  (Read 4844 times)

Qobacha

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Auto Generate Class Diagram from Sequence Diagram
« on: November 01, 2012, 02:20:49 pm »
Hi,

How can I auto generate the class diagrams from the sequence diagrams so that I don't have to keep on updating the class diagram every time I make changes to the sequence diagrams.

philchudley

  • EA User
  • **
  • Posts: 750
  • Karma: +22/-0
  • EA Consultant / Trainer - Sparx Europe
    • View Profile
Re: Auto Generate Class Diagram from Sequence Diag
« Reply #1 on: November 01, 2012, 08:12:56 pm »
Do you mean when you add a message on a sequence diagram you wish the class diagram to show the operations?

If so, after adding a message between lifelines, click the Operations button on the Message properties dialog (To right corner)

This opens up the operations diagram for the class which the lifeline is representing. Complete as normal, upon closing this dialog, the Message properties will have been completed. After closing this dialog the Sequence diagram will show the message and the class diagram(s) will also have been updated.

For this to work, the Lifelines must be classified with the class (i.e. represent object instances of the class). This can be achieved by dragging a class from the Project Browser onto the Sequence Diagram and then choosing the option Instance of Element. (I would not recommend using Simple Link)

Hope this helps

Phil
Models are great!
Correct models are even greater!

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Auto Generate Class Diagram from Sequence Diag
« Reply #2 on: November 02, 2012, 09:14:34 am »
Phil's answer is correct. You can't auto-generate a class diagram from a sequence diagram, there simply isn't enough information, but you can update the class elements while creating sequence messages.
« Last Edit: November 02, 2012, 09:16:07 am by KP »
The Sparx Team
[email protected]