Book a Demo

Author Topic: Adding package in ordered place  (Read 3351 times)

Fabio Riera

  • EA User
  • **
  • Posts: 27
  • Karma: +0/-0
    • View Profile
Adding package in ordered place
« on: July 11, 2013, 04:06:01 am »
Hi there!

I have a package with several subpackages ordered manually by name.
My add-in has to add a new package in the correct place.
i'm using:
mainPackage.Packages.AddNew("name", "otPackage")

So... how I change the position of a package in a Packages collection?
I tried the TreePos property but it results no effect.

Thanks in advance
« Last Edit: July 11, 2013, 04:53:17 am by fabioriera »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Adding package in ordered place
« Reply #1 on: July 11, 2013, 05:22:16 am »
It might be a refresh issue. The 2nd parameter value "otPackage" is useless.

q.

Fabio Riera

  • EA User
  • **
  • Posts: 27
  • Karma: +0/-0
    • View Profile
Re: Adding package in ordered place
« Reply #2 on: July 11, 2013, 05:28:46 am »
Yes, you are correct. If I reload the project, the package is shown in the treepos position. Is there a way to refresh the package content?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Adding package in ordered place
« Reply #3 on: July 11, 2013, 05:35:01 am »
Can't recall right now, but the help will show you some Refresh method.

q.