Skip to main content
1-Visitor
May 29, 2025
Question

How to add WTPart as a child to Parent part in Part Structure Browser without iterating parent part

  • May 29, 2025
  • 1 reply
  • 2070 views

I have a requirement where if I add a specific type of WTPart to existing Part in Part structure using OOTB actions "add existing"/"add new", the Parent part to which I want to add child part should not iterate.  For this I have implemented listener and catch the PRE_STORE event and could found the target object which is WTPartUsageLink. From this I got both  roleA and roleB objects, and then I undo check out the roleA (parent) and then created an usagelink and finally tried to save it using PersistenceHelper.manager.insert() API

Here the issue is probably in back end after PRE_STORE , there is PRE_CHECKIN event that might be calling so I am getting exception that unable to find the checked-out copy. Here there will not be any working copy because I undo check out it using WorkInHelper.. API. 

My overall intension is that parent part should not iterate but need to create usagelink by adding a  child part (of specific type).

 

Note: This I need only when I am trying to add a specific type of part which will not involve any release. I have an option in my mind of creating custom action followed by implementing custom Form Processor, however, I want to know the feasibility of using existing OOTB actions by implementing listeners.

Can anyone help me out for this? Thanks in advance 

1 reply

16-Pearl
May 30, 2025

Hi @AKC_301264,

At first place why the parent part shouldn't iterate?

1-Visitor
May 30, 2025

Hi @TDT ,

 

The part which we would like to add in part structure is of specific type which will not be go for production release to any plant. This is just to add some information to existing parent part. So I just want to know the feasibility if we can achieve this with OOTB actions itself 

Fadel
23-Emerald I
May 30, 2025

Without iterating is against Windchill specs, he only way is to go through SQL and do an insert into WTPartUsageLink

 table, but this not really supported .

Buiꓘa