Windchill Listener Rename only on first checkin
Hi All,
I have written a windchill listener that waits for EPMWorkspaceManagerEvent.PRE_WORKSPACE_CHECKIN events, and then changes the names of epm documents, and parts in certain ways depending on some IBA.
It works fine, a part from the fact that I am unable to distinguish between the first checkin, when the autonumber is substituted with the proper computed-by-the-listener name, and all the following checkins.
For example, I checkin the part 295.prt, and it gets renamed to NEWNAME-142-DONE.prt; then, I modify it, and check it in again, but instead of becoming A.2, it becomes NEWNAME-143-DONE.prt, version A.1. This does not happen to the WTPart, which is renamed as well initially, but then keeps the same name and only increases the iteration.
Is there any attribute of the EPMDocument that I can check? Any API that could help me?
(I may check the format of the name to verify if it has been already renamed, but I would prefer to use something else, beacuse it may be the case that parts with a different format exist and they should keep the different name).
Thank you in advance.
Regards
Davide

