Additional Windchill Capabilities > Manufacturing Process Management > Customizing the Product Structure Explorer (PSE) > Customizing PSE to Handle Modeled Subclasses > Solution > Writing a Copy Delegate for a Custom Class > Creating a Copy Delegate
  
Creating a Copy Delegate
As illustrated in the figure, you can simply extend wt.enterprise.CopyWTPartDelegate and override its newCopy() method. The purpose is to handle any custom attributes, in this particular case, myAttr. Here’s how this method is implemented:
public final RevisionControlled newCopy( RevisionControlled object
)throws WTException {
//##begin newCopy%461E645C0050f.body preserve=yes
if (object == null) return null;
MyPart new_copy = (MyPart) super.newCopy(object);
MyPart original = (MyPart) object;
String my_attr = original.getMyAttr();
if (my_attr != null) {

try {
new_copy.setMyAttr(original.getMyAttr());

}
catch (WTPropertyVetoException e) {
throw new WTException(e);
}
return new_copy;
//##end newCopy%461E645C0050f.body

}