Book a Demo

Author Topic: Find elements for connector  (Read 2848 times)

di97mni

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Find elements for connector
« on: September 07, 2007, 05:57:57 am »
Hi,

I'm trying to find the elements connected with an association.

For example, I have an order entity that is associated with OrderItem. How can I find source and target element?

|Order|---------> |OrderItem|

I'm programming in C# and referencing Interop.EA but any code sample is great.

Something like this psedou code:

Code: [Select]

Function LoadAssociations(EA.Package package)
 iterate over each element in package
   find it's associations
     create an association holder and set source and target element
     add to result list
   end find
 end iterate
end function



Br,
Martin

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Find elements for connector
« Reply #1 on: September 07, 2007, 06:37:03 am »
Hi Martin,

The ClientID and and SupplierID properties relate to the source and target elements repectively. Each returns an integer that can be used as the argument to the Repository.GetElementByID method.

HTH, David
No, you can't have it!