Book a Demo

Author Topic: Copy Element via automation  (Read 5130 times)

Michael Proske

  • EA User
  • **
  • Posts: 72
  • Karma: +0/-0
    • View Profile
Copy Element via automation
« on: May 16, 2012, 03:20:35 am »
Is it possible to clone an element via automation interface completely like it is done in the gui via copy/paste element. Or is it possible to create an xmi file that just contains one element. I want just copy an element between two repositories.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Copy Element via automation
« Reply #1 on: May 16, 2012, 04:45:31 am »
Michael,
there are some recent posts about this here on the forum. Basically it's done by moving elements into a (dummy) package and call clone for that. To copy between repositories you need to ex-/import - also via a dummy package.

q.
« Last Edit: May 16, 2012, 04:47:05 am by qwerty »

Michael Proske

  • EA User
  • **
  • Posts: 72
  • Karma: +0/-0
    • View Profile
Re: Copy Element via automation
« Reply #2 on: May 16, 2012, 04:27:18 pm »
qwerty thanks i did not receieve a search result yesterday with the slow internet from the train the method you explained was the one i had in mind as fallback because it is not was i really wanted to do. My idea is to synchronize two repositories for some entries. With package import and export i always change the element guid what i want to avoid. I need a synchronized copy of an element stored under two different element guids with an permanent update. I have modelled Software products and i need some kind of a reference catalogue that will be maintained in one place and shared with other projects but i only want to have some of the products.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Copy Element via automation
« Reply #3 on: May 16, 2012, 07:43:04 pm »
Michael,

That's what version control integration is for.
We use the same principle for some of our shared models. The master is stored in the version control system, and an update is simply getting a latest version.
We have currently three repositories who each contain two shared models.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Copy Element via automation
« Reply #4 on: May 16, 2012, 10:23:36 pm »
Quote
With package import and export i always change the element guid what i want to avoid
Definitely not. The element guid is preserved. Only if you explicitly specify Strip GUIDs you get new ones.

q.

Makulik

  • EA User
  • **
  • Posts: 400
  • Karma: +0/-0
    • View Profile
Re: Copy Element via automation
« Reply #5 on: May 17, 2012, 12:02:56 am »
Quote
That's what version control integration is for.
Hi Michael,

That was also what I've been thinking of to give you advice on this topic after your last reply.
We're also using shared models via version controlled packages and I can confirm that this works very well.

Günther