Author Topic: How do I open a package from a diagram?  (Read 3333 times)

Alistair

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
How do I open a package from a diagram?
« on: June 30, 2004, 03:03:53 am »
I'm developing an add-in for EA 3.60.

Lets say the user has a created a diagram and on that diagram is a package. The user selects the diagram from the tree view and invokes the add-in.

I can get the selected IDualDiagram object from the repository and can search through the DiagramObjects collection until I find an IDualElement with type "package". This is the element that represents the package on the diagram. So far so good.

What I really want to do is extract the elements and packages collections from the package. I don't have a reference to the IDualPackage. I only have the IDualElement which is a component of the package.

How can I navigate from the IDualElement which represents the package to the IDualPackage which owns it?

Alistair