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

Change the Owner link from the wtPart to the Drawing

lgrant
14-Alexandrite

Change the Owner link from the wtPart to the Drawing

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).

5 REPLIES 5

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

 

 

 

 

lgrant
14-Alexandrite
(To:d_graham)

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_Compar...

 

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

I think this is what you want.

Just switch the views.

 

In the first image below notice:

A.6 (As Designed) Content

A.7 (Modeled) Owner

 

We need to switch the views so that we have:

A.6 (Modeled) Content

A.7 (As Designed) Owner

 

Before running code.

beforeSwitchingViews.png

 

After running code.

We have what we want,

A.6 (Modeled) Content

A.7 (As Designed) Owner

afterSwitchingViews.png

 

Nothing gets iterated Part structure uses the same WTParts.

The only thing that is different is that the views have been flip-flopped.

The code made a system wide change. Everything that was view 'Modeled' in now 'As Designed' and visa versa.

 

If you have some that are already fixed the code would have to filter them out of the change.

 

I think this is what you want?

 

David

lgrant
14-Alexandrite
(To:d_graham)

Hi David.

Absolutely, that is what we are doing. 

It is still a mystery when the change was made by PTC were changes from the owner CAD file did not write over changes manually made on the BOM?

When this was happening it caused a lot of issues when the BOM managers would correct the BOM only to have the CAD folks change it again. To that end the company left the Modeled view as the space for CAD and then created a downstream "As Designed" view that was the managed and approved BOM.

Announcements