Skip to main content
16-Pearl
September 14, 2020
Question

Change the Owner link from the wtPart to the Drawing

  • September 14, 2020
  • 1 reply
  • 3451 views

Background. We started using wtParts and used a view called "Modeled". Since then we have updated that wtPart structure with a view called As Designed (eBOM) from MAPSB. The plan is to then use the As Designed to create a Staged View (mBOM).

To do that we need to Reassign the wtPart view. That can ONLY be done on wtParts that have ONLY one view.

 

So, for all the parts we have (thousands) that have an older Modeled view and a newer As Designed view we need to change the Owner link from the Modeled to the As Designed so when Engineers bring in the Drawing into Creo they will also add the As Designed wtPart to the workspace and modify the together.

 

It seems that we can edit the associations from the Windchill side (edit associations and change the modeled from Owner to content and then add the As Designed as the Owner).

It also seems that you can do this inside the workspace.

We have mixed results with this. 

 

Can someone provide some guidance on what is the correct way to do this?

We would prefer to make the changes needed systematically (rather than rely on Engineers to make the changes.. they have enough to do already).

1 reply

18-Opal
September 16, 2020

This can be done using APIs to do a mass cleanup.

 

I wrote code that:

Finds all "Owner" associations where the WTPart has view "Modeled".

The Owner association is then replaced with a Content association.

 

Finds all "Content" associations where the WTPart has view "As Modeled".

The "Content" association is then replaced with an "Owner association.

 

Note:  WTParts must be iterated just like if doing this manually.

The incorrect Owner association MUST be fixed first as there can be only one Owner.

 

Before running code.

beforeSwitchingLinks.png

 

After running code.

afterSwitchingLinks.png

 

 

 

 

lgrant16-PearlAuthor
16-Pearl
September 17, 2020

If you look at the association table from PTC it looks like nothing has changed but I'm guessing it's all in the details.

Something changed in 11 that now stops CAD drawing (Owner) changes from updating the wtPart structure?

http://support.ptc.com/help/windchill/whc/whc_en/index.html#page/Windchill_Help_Center%2FMCPR_ComparingCADandPartAssocTypes.html%23

 

18-Opal
September 17, 2020

Got it.

If you want to update the WTPart structure such that the ‘Modeled’ view WTParts are replaced by the ‘As Designed’ view WTPart. Likewise with Owner and Content associations.

 

In short, all that really needs to be done is to switch the views on the WTParts and we’re good.

 

You can’t do this in the GUI but you can with a script.
Do you have access to your dB?

If yes, I can coach you through this.

 

David