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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Is there a way to remove a WTDocument from WTParts in bulk?

Prabhu
7-Bedrock

Is there a way to remove a WTDocument from WTParts in bulk?

There is a loader utility to associate WTDocuments to WTParts in bulk.  In the same loader, we could associate one WTDocument to one WTPart, one WTDocument to multiple WTParts, multiple WTDocuments to one WTPart or multiple WTDocuments to multiple WTParts.

 

Likewise, is there a way to disassociate WTDocument(s) from WTPart(s) through bulk operation?

2 REPLIES 2

Hi @Prabhu,

 

As far as my understanding and findings, there is no such OOTB utility available to disassociate WTDocument(s) from WTPart(s).

However, if you are comfirtable/open to customization approach you can write small program to achieve this use case.

For any API assistance, you can log a PTC Support case.

 

But to outline this approach, below points can be noted:

1. Get the handle of WTPart of which document association you want to remove.

2. Using Windchill API you can get the association link and WTDocument

3. Once you have the association link, you can then use "PersistenceHelper.manager.delete(link)"API to remove the link.

 

Note: You may probably need to handle Check-in/Check-out condition for WTPart (I have not explicitly tried these steps, but the approach is more or less same).

 

I hope this helps you.

 

Regards,

Shirish

You can take a look at this KB article which I belive is what you're looking for:

https://www.ptc.com/en/support/article?n=CS152690

 

Regards,

Shirish

Top Tags