Book a Demo

Author Topic: Moving an element from one package to another  (Read 2936 times)

Ced

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Moving an element from one package to another
« on: May 28, 2010, 12:53:25 am »
Hello,

I would like to move an element contained in one package to another package. For now, the only way I know of would be to delete it from the original package (removing it from the Collection) and add it to the other package.
This is rather annoying because if the element was shown in a diagram, it is removed and all information attached to it also.
I saw that there is a "SetPackageID" on the Element but this doesn't seem to be doing what I want. I even refreshed the Collections of both packages but this didn't help. How should this function be used ?

If I move an element from one folder to another one directly in EA, everything seems to work fine, so how is it implemented internally ?

Thanks

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Moving an element from one package to another
« Reply #1 on: May 28, 2010, 01:11:37 am »
Setting the packageID (and don't forget to update the element) should work.
Does the packageID column in the t_object table gets updated?

Geert

Ced

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Moving an element from one package to another
« Reply #2 on: May 28, 2010, 04:45:59 pm »
Hello Geert,

I forgot to update the element. It works fine if I update it.

Thanks for your help.
Cédric