Book a Demo

Author Topic: Cloning EA.Element  (Read 4340 times)

tzafrir

  • EA User
  • **
  • Posts: 127
  • Karma: +0/-0
    • View Profile
Cloning EA.Element
« 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

Helmut Ortmann

  • EA User
  • **
  • Posts: 970
  • Karma: +42/-1
    • View Profile
Re: Cloning EA.Element
« Reply #1 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
Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Cloning EA.Element
« Reply #2 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.