I am working on an EA Addin in c# (thanks Geert) and would like to move exisiting elements from a package to another using the code.
It is clear how to add or delete elements to/from EA.Collection p.Elements, but this does not work sincethis procedure changes the GUID of the element.
Is it possible at all?
Yes. You simply need to change the packageId
property to be that of the new package and you're done. Don't forget the update()
after you changed it.
Additionally you can change the position in the browser with TreePos
in which case you should explicitly number all elements that are listed for the according package. Ordering ad hoc will likely produce strange results since the sort order in EA is - I have no words for that ;-)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With