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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Listener for Save As operation

karan1904
10-Marble

Listener for Save As operation

Hi,


I am trying to create a Listener in Windchill for the Save-As action performed from an EPMDoc. I am trying to usePersistenceManagerEvent.COPY_LINK,but this does not seems to be working out.


Could anyone suggest on this.


Thanks,


Karan

8 REPLIES 8

Are you trying to do something before or after the save as action/wizard is used?


Sent from my Verizon Wireless BlackBerry

Hello Karan

If you listen COPY_LINK, you need to navigate to the associated objects.
PRE_COPY or POST_COPY can be used in-line with your requirements.

HTH





Thank you and have a great time.

Best Regards

Swamy Senthil

Principal Solutions Architect, Swasen Inc

swamy.senthil@swasen.com(Email); 909 800 8423(M); 973 324 2729(W); 866
908 6561(F);


Hi Dave,


I want to perform the action after the Save-As operation.


Thanks,


Karan

Hi Swamy,


My requirement is to perform some operation on the new object that gets created after save-as operation.


POST_COPY and PRE_COPY does not seems to be working.


Regards,


Karan

avillanueva
22-Sapphire II
(To:karan1904)

It is possible that these events are related to copy/paste operations in
the folder or search results. I have found that events do not always
get thrown when you would expect them to. Since there is a save as
history object recreated, you might have to track those objects and look
for pre and post store.


Yeah I believe there is a NEW_COPY also generated by
wt.enterprise.EnterpriseHelper copy methods which act as a delegate for
whatever class is registered to actually duplicate the object you are
working with. Karan, TCS should have someone within your company that can
help you answer this or troubleshoot with you further. Good luck.




Hi Antonio,


I have tried using POST_STORE, butit was not able to catch the event.


Thanks,


Karan

Hello Karan

If you need to perform some operations on the copied object, then the best
bet is listening for MadeFromLink.

When you perform SAVE-AS, a link wt.enterprise.MadeFromLink is created for
associating the original object and the copied object. Try to capture the
store event of MadeFromLink

and from MadeFromLink, original and copied objects can be retrieved from
getOriginal() and getCopy(). If this approach is not working for you, please
indicate what is not working.



Thank you and have a great time.

Best Regards

Swamy Senthil

Principal Solutions Architect, Swasen Inc

swamy.senthil@swasen.com(Email); 909 800 8423(M); 973 324 2729(W); 866
908 6561(F);










Announcements


Top Tags