Book a Demo

Author Topic: Retriving package structure (using C#)  (Read 4193 times)

piotrek84

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Retriving package structure (using C#)
« on: May 01, 2009, 04:08:19 am »
Hello everyone,
Can anyone advice me on how to get the structure of a package? I was trying something like this:
foreach (EA.Element elem in package.Elements)
{
...
}
but this itterates through all of the elements in package, and not only the top-level ones...
Thanks in advance

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Retriving package structure (using C#)
« Reply #1 on: May 02, 2009, 02:14:09 am »
Test the parent of each element. If the element is not first-level (i.e. it is owned by some other element in the package) it should show a different (or non-empty) parent.
No, you can't have it!

carlslater

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Retriving package structure (using C#)
« Reply #2 on: January 17, 2014, 04:00:20 pm »
Great day! What kind of structure? Can you elaborate it. Thanks.
Learn more on <a href="http://www.llewellyneurope.com/health-and-safety/health-and-safety-assistance/">health and safety specialising in dangerous goods</a>

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Retriving package structure (using C#)
« Reply #3 on: January 17, 2014, 10:52:04 pm »
Midnight has gone some years ago. Just have a look in my Scripting book :-)

q.