Sparx Systems Forum

Enterprise Architect => Bugs and Issues => Topic started by: Mamta on September 03, 2009, 04:17:24 am

Title: Copy a Class
Post by: Mamta on September 03, 2009, 04:17:24 am
Hi,

  How do you copy a class from one package to other without copying class diagram ( I know there is an option to copy classes while copying diagram)  ?

Regards
MS
Title: Re: Copy a Class
Post by: Geert Bellekens on September 03, 2009, 08:49:21 pm
Copy the class (press Ctrl-C, works best on a diagram)
Go to a diagram in the destination package
Right-Click and choose "Paste as New" (Ctrl-Shift-V)

Geert
Title: Re: Copy a Class
Post by: Mamta on September 04, 2009, 02:22:21 am
Hi,

  Well as stated in query,  I know that we can copy a class from a package to other through a class diagram.

Here I need to copy the class from a package to other, change the class.  

Regards
Mamta
Title: Re: Copy a Class
Post by: «Midnight» on September 04, 2009, 02:27:22 am
Look into Deep Copy. You might have to create a temporary diagram to hold the class (or classes) you want to copy. Once you've completed the deep copy you can delete the diagram.
Title: Re: Copy a Class
Post by: NeilS on September 09, 2009, 08:28:14 pm
Another approach is to export to XMI and then import not forgetting to check the strip guids option.

Obviously this is fine if you don't want to persist links.

Neil