Skip to main content
5-Regular Member
March 6, 2023
Solved

Custom SaveAs in Windchill

  • March 6, 2023
  • 1 reply
  • 2754 views

I would like to replicate the OOTB Save As feature. The purpose is to get the custom attributes value from Users for populating new name/number/filename through custom wizard.

Using EnterpriseHelper.service.saveCopy(oldepm,newepm) helps me achieve half of the requirement. The problem here is while opening the newly created 2D Drawing in Authoring Application, it throws pop-up message like this new 2D still referring the old 3D Model. In OOTB save as, it does that from Windchill itself.

 

 

 

 

Best answer by HelesicPetr

Hi @MN_10518175 

The issue can be that you make a copy separately one by one I guess.  I may be wrong.

Try to collect all objects and use to create copy following method

 

RevisionControlled[] input = new RevisionControlled[]{model, drawing};
EnterpriseHelper.service.newMultiObjectCopy(input);

 

PetrH

1 reply

HelesicPetr
22-Sapphire II
22-Sapphire II
March 6, 2023

Hi @MN_10518175 

The issue can be that you make a copy separately one by one I guess.  I may be wrong.

Try to collect all objects and use to create copy following method

 

RevisionControlled[] input = new RevisionControlled[]{model, drawing};
EnterpriseHelper.service.newMultiObjectCopy(input);

 

PetrH

5-Regular Member
March 7, 2023

Thanks for your valuable suggestions.

 

After changing the logic using above API, authoring application doesn't show the above error popup. The only thing is the new drawing's representation still holds old value in drawing table. If perform OOTB save as, post republish, the value changes in representation. Could you please provide some way to achieve the same.

HelesicPetr
22-Sapphire II
22-Sapphire II
March 7, 2023

Hi @MN_10518175 

 

The point of the old visualization is that you may not send the new object to visualization queue

or your visualization worker is not set to regenerate drawing during the visual process.  

 

PetrH