Book a Demo

Author Topic: Copy a Class  (Read 5001 times)

Mamta

  • EA Novice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Copy a Class
« 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

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 a Class
« Reply #1 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

Mamta

  • EA Novice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Re: Copy a Class
« Reply #2 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

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Copy a Class
« Reply #3 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.
No, you can't have it!

NeilS

  • EA User
  • **
  • Posts: 27
  • Karma: +0/-0
    • View Profile
Re: Copy a Class
« Reply #4 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