Author Topic: How to get multiple packages?  (Read 2954 times)

harbourfish

  • EA Novice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
How to get multiple packages?
« on: July 21, 2010, 01:47:08 pm »
Now, I select multiple packages in the EA. In my add-in code, I can only find m_Repository.GetTreeSelectedPage() method, which only returns one selected package. How to get multiple packages which I select in the EA?Any one could help me?

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: How to get multiple packages?
« Reply #1 on: July 21, 2010, 03:13:46 pm »
Hi Harbourfish,

I don't think it's possible yet...

GetTreeSelectedElements()  is supposed to return a set of elements (and I think Packages are elements in this context) but if you select more than one item in the browser, the add-in sub menu is disabled so there doesn't seem to be any way for your add-in to get the event.

Perhaps others can shed more light...

HTH,
Paolo
« Last Edit: July 21, 2010, 03:20:12 pm by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

harbourfish

  • EA Novice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Re: How to get multiple packages?
« Reply #2 on: July 21, 2010, 07:29:08 pm »
It works! Thank you very much!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: How to get multiple packages?
« Reply #3 on: July 21, 2010, 08:00:49 pm »
Quote
It works! Thank you very much!
What works?  

GetTreeSelectedElements()?  How do you trigger the Add-In?

Can you tell us more?

Paolo
« Last Edit: July 22, 2010, 10:18:41 am by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13387
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to get multiple packages?
« Reply #4 on: July 26, 2010, 04:19:10 pm »
Paolo,

I'm just guessing here, but if you first start-up the addin, then ask the user (in a non-modal form) to select elements and press [OK] then you should be able to use this GetTreeSelectedElements() no?

Geert