Book a Demo

Author Topic: How to determine a package`s ID?  (Read 4464 times)

palim

  • EA User
  • **
  • Posts: 31
  • Karma: +1/-0
    • View Profile
How to determine a package`s ID?
« on: March 03, 2010, 02:50:40 am »
Hello guys,

I`ve got the following problem:
I have two packages that are contained in one common model.
These packages contain several elements.

Now, I want to iterate over a package`s elements.
But I can`t use the method 'GetTreeSelectedPackage'.
So, how can I determine those two packages?
There is no method like 'GetPackageByName', right?


Best regards,
palim

palim

  • EA User
  • **
  • Posts: 31
  • Karma: +1/-0
    • View Profile
Re: How to determine a package`s ID?
« Reply #1 on: March 03, 2010, 03:01:31 am »
Well, I think I found something.
Have a look on script "Non-Recursive Model Dump Example" that is being shipped with Enterprise Architect.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to determine a package`s ID?
« Reply #2 on: March 03, 2010, 09:34:05 pm »
Palim,

Use the Repository.SQLQuery to query for the id of the package.
That is by far the fastest solution.

Geert

palim

  • EA User
  • **
  • Posts: 31
  • Karma: +1/-0
    • View Profile
Re: How to determine a package`s ID?
« Reply #3 on: March 03, 2010, 10:55:37 pm »
I`ll do that.
Thank you.


Quote
Palim,

Use the Repository.SQLQuery to query for the id of the package.
That is by far the fastest solution.

Geert