Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: tzafrir on March 17, 2016, 05:03:26 pm

Title: Cloning EA.Element
Post by: tzafrir on March 17, 2016, 05:03:26 pm
Hi,

Is there an API to clone EA.Element, similar to the cloning API of a package EA.Package package.Clone()?

Tzafrir
Title: Re: Cloning EA.Element
Post by: Helmut Ortmann on March 17, 2016, 06:57:08 pm
Hi,

yes.

Have a look at: http://community.sparxsystems.com/tutorials/572-44create-your-first-c-enterprise-architect-add-in-in-10-minutes
There you find all Events you can use. Geert has documented them. Useful stuff for writing Addin.

Helmut
Title: Re: Cloning EA.Element
Post by: qwerty on March 17, 2016, 07:24:31 pm
No, there isn't. Use Package.Clone for single elements by creating a dummy package and cloning that with the element temporarily moved in. Or write your own clone method.

q.