Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Gokcen Guner on October 25, 2013, 02:04:44 am
-
Hello,
I need to copy-paste some elements in the same package. These elements are usecases. When using GUI, this operation creates a usecase named with the original one plus " - Copy". Can I use automation interface to achieve same thing?
Thanks in advance.
-
You can use copy/paste diagram to do this :
1. Create a diagram containing all the elemenst you want to clone
2. Select the package and launch paste diagram
3. Select the option "Deep" or "Smart" depending on your intention.
4. That's it.
Beware : the objects are cloned. It means that all their properties including their relationships are cloned.
-
You can use copy/paste diagram to do this :
1. Create a diagram containing all the elemenst you want to clone
2. Select the package and launch paste diagram
3. Select the option "Deep" or "Smart" depending on your intention.
4. That's it.
Beware : the objects are cloned. It means that all their properties including their relationships are cloned.
Thanks Yves but I need to do this using automation not GUI.
-
You could use the Repository.Clone method if you move the element(s) to clone into a temp package. (Should I say that it would be nice if the API would be a bit more OO and offer clone and delete methods for all objects?)
q.
-
You could use the Repository.Clone method if you move the element(s) to clone into a temp package. (Should I say that it would be nice if the API would be a bit more OO and offer clone and delete methods for all objects?)
q.
Hi qwerty,
I couldn't find Repository.Clone method in EA Help contents. There is only one clone method in Package class.
I also agree what you wrote in parenthesis :)
-
Sorry. It's package.clone (of course). You'd need to call that for the temp package where you moved in the elements to clone.
q.
-
Sorry. It's package.clone (of course). You'd need to call that for the temp package where you moved in the elements to clone.
q.
Thank you qwerty. I'll check it out.