1
votes

I'm trying to create diagrams through the Enterprise Architect Java API. Since we got a template for our diagrams, the simplest approach would be to copy the element in which the diagram is placed and paste it into the desired place.

I found the method clone() form the package class but I did not find any similar method for the element class or the diagram class.

1

1 Answers

2
votes

You can either do it "manually" by creating a new element or diagram and copying all properties to the new element, but that is quite some work.

Or you could move everything you want to copy into a package and then use EA.Package.Clone(). After cloning the package you can move the source elements back to their original location.