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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Is there a way to change the type of a WTPart?

Prabhu
10-Marble

Is there a way to change the type of a WTPart?

Hi All,

Is there a way to change the type of a WTPart through UI or through any other method? Is there a tool to convery WTParts from one type to another in bulk?

Thanks,

Prabhakaran V.

5 REPLIES 5

unfortunately, only by customization.

And this is not supported by PTC....

sderoose
13-Aquamarine
(To:Prabhu)

There is a tool to do this:

https://www.ptc.com/appserver/cs/view/solution.jsp?n=CS7287

The tool will generate a SQL script you'll need to execute. You can change the SQL script so only parts in a certain product/library are converted.

best regards,
Stijn

Prabhu
10-Marble
(To:sderoose)

You are correct Stijn.. Got the tool from PTC. Looking for ways to manipulate it to our needs.

This tool would convert all, I mean ALL, parts in the whole system from one type to another. Need a way to do the same selectively on specific parts.

Will update if we get to succeed.

Thanks,

Prabhakaran V.

You can do it like this:

Oracle:

UPDATE WTPart

SET branchIdA2typeDefinitionRefe = 126962,

Ida2typedefinitionreference = 126966

Where Branchida2typedefinitionrefe In (36374)

AND Ida3masterreference in (select ida2a2 from wtpartmaster where WTPartNumber in ('2000783'.'2000789'));

MS SQL:

UPDATE pdmlink.WTPart

SET branchIdA2typeDefinitionRefe = 61479,

idA2typeDefinitionReference = 492826

WHERE branchIdA2typeDefinitionRefe IN (71144)

AND idA3masterReference IN (select idA2A2 from pdmlink.WTPartMaster where WTPartNumber in ('2000783','2000789'));

We also have performed direct DB updates to repoint a given Object Master to a different Type Definition. It does work but it is suggested to use this approach only were absolutely needed. Soft attributes you may have defined for a particular object instance are still associated to the item even if you repoint the type definition.

Those attributes may not be valid for the new type definition and so when an UPDATE, REVISE or SAVE AS is performed the old attributes are not available in the GUI to clear and so keep getting carried forward. If this is undesirable then you would also need to remove the reference of those attributes to the object instance that you repointed the type definition...

Our users have asked us to develop an object re-typing tool but so far we have resisted the temptation to do so...

Good Luck

Announcements


Top Tags