Book a Demo

Author Topic: GetTreeSelectedElements strange behaviour  (Read 4424 times)

Hermont

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
GetTreeSelectedElements strange behaviour
« on: July 20, 2015, 04:26:53 am »
Hello everyone.

I'm trying to get how many elements are selected on the project browser using EA.Repository GetTreeSelectedElements but the result is really strange. I try to select two elements the GetTreeSelectedElements().Count returns 1, I try to select N elements using shift and it returns 2. Anyone got a clue  on how to fix this?

Thanks!

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: GetTreeSelectedElements strange behaviour
« Reply #1 on: July 20, 2015, 05:29:57 am »
It only works on elements. If you mix packages and diagrams you don't get them in return.

q.

Hermont

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: GetTreeSelectedElements strange behaviour
« Reply #2 on: July 20, 2015, 10:47:28 am »
That's the strange issue. All items I'm working with are Requirements.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: GetTreeSelectedElements strange behaviour
« Reply #3 on: July 20, 2015, 09:23:02 pm »
Try to run Project/Data Management/Integrity/Recover first. ignore the scary message and click ok. Still the same issue then?

q.