Book a Demo

Author Topic: Connection between DiagramObject and Element  (Read 2743 times)

mrtotov

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Connection between DiagramObject and Element
« on: February 13, 2009, 01:22:16 am »
Hi. I have to compare the elements contents in a diagram with the elements of the package. For example, if I create a class in a package, and after that I insert the same class in a diagram "as Simple Link", there is no problem, because the ElementID of the Element is the same of the DiagramObject. But if I choose to insert the class "as Instance of Element",  I can't match a connection between this two objects. (My final purpose is to check that all the classes included in a Sequence diagram are in the Class Diagram too, so I must find a property that connect the elements of the two diagrams).
Thanks.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Connection between DiagramObject and Element
« Reply #1 on: February 13, 2009, 06:29:13 am »
It sounds like you are disconnecting because an Object is only an instance of the Class it belongs to. You need to retrieve the Element (via ElementID) for each object. After ensuring that each is indeed an Object, the ClassifierID attribute of each points to the Class itself. If these pointers are the same you should have your answer.
No, you can't have it!