cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

We are happy to announce the new Windchill Customization board! Learn more.

API to copy MPMOperation

rzemmali
11-Garnet

API to copy MPMOperation

Hello,

 

Is there an API to make a copy of an MPMOperation ?

 

Thanks,

1 ACCEPTED SOLUTION

Accepted Solutions

I used CopyMPMOperationDelegate and it worked fine :

CopyMPMOperationDelegate delegate = new CopyMPMOperationDelegate();
MPMOperation copy =(MPMOperation) delegate.newCopy(original);

 

Just one remark: Name and Description will not be copied so just use getters and setters.

View solution in original post

2 REPLIES 2
d_graham
17-Peridot
(To:rzemmali)

@rzemmali 

Try this:

 

To copy an operation

MPMOperation copiedOp = MPMOperation.newMPMOperation(<the MPMOperation to be copied>);

 

To make a new operation from scratch

MPMOperation newOp = MPMOperation.newMPMOperation();

 

Hope this helps,

 

David

I used CopyMPMOperationDelegate and it worked fine :

CopyMPMOperationDelegate delegate = new CopyMPMOperationDelegate();
MPMOperation copy =(MPMOperation) delegate.newCopy(original);

 

Just one remark: Name and Description will not be copied so just use getters and setters.

Top Tags