Skip to main content
1-Visitor
Jul 28, 2016 10:51 AM UTC
Solved

Converting WT file as End Item WT

I have 60 top level assemblies and I created wt part for the same. Now I need all 60 wt part to be converted as End Items. Can I do this in Windchill or should I remove association of all wt, delete wt's, create End item wt and then associate it again with respective assemblies?

cgadreAnswer
2-Explorer
Jul 28, 2016 1:57 PM UTC

Hello Dhanraj,

If you just want to convert part to End item you can right click on WTPart and choose Edit Common Attributes action and Set End Item to Yes as shown in snapshot below.

The only issue is you have to do it manually for 60 items. You can use api also if you know how to do it programatically.

end item.PNG

8 replies

cgadre2-ExplorerAnswer
2-Explorer
Jul 28, 2016 1:57 PM UTC

Hello Dhanraj,

If you just want to convert part to End item you can right click on WTPart and choose Edit Common Attributes action and Set End Item to Yes as shown in snapshot below.

The only issue is you have to do it manually for 60 items. You can use api also if you know how to do it programatically.

end item.PNG

Translate
dm-41-VisitorAuthor
1-Visitor
Jul 29, 2016 4:27 AM UTC

It works!!

Thank you Chinmay Gadre‌

Translate
ShirishMorkhade
16-Pearl
Jul 28, 2016 3:19 PM UTC

Hi Dhanraj M‌,

As Chinmay Gadre‌ said you can use Edit Common Attribute wizard to change WTPart to End Item. Otherwise, if you want to do it programatically, you can do it using below code snippet.

  ObjectIdentifier oid = ObjectIdentifier.newObjectIdentifier("wt.part.WTPart:231966");

  WTPart prt = (WTPart)PersistenceHelper.manager.refresh(oid);

  System.out.println(" *** Converting WTPart to End Item *** ");

  WTPartMaster pm = (WTPartMaster) prt.getMaster();

  pm.setEndItem(true);

  PersistenceHelper.manager.save(pm);

  System.out.println("Set as End Item");

Well, I tested this in Windchill 10.2 M030 in very limited fashion. Please do additional testing in test box first and confirm.

I hope this helps you.

Thanks,

Shirish

Translate
dm-41-VisitorAuthor
1-Visitor
Jul 29, 2016 4:28 AM UTC

Thank you Shirishkumar Morkhade‌

Translate