Windchill8.0中WTPartUsageLink的用法及介绍

背景介绍: Windchill8.0中要实现一个产品和其多个零件组成情况时,例如实现:一个汽车有四个轮子,这个汽车是一个产品,而轮子是零件,四个就是他们之间的关系,在Windchill8.0中是用WTPartUsageLink关联他们的,此处需注意的是:产品(汽车)是有版本的,零件(轮子)是无版本的;也就是说零件的版本变化不会影响产品结构 片段程式示例代码: //根据产品名称获得最新版本的Product WTProduct product = getLatestVersion("productNames"); //将产品出库 product = checkOut(product); //构造link对象 WTPartUsageLink link = WTPartUsageLink.newWTPartUsageLink(product, (WTPartMaster)wtPart.getMaster()); //保存关联 link = (WTPartUsageLink) PersistenceHelper.manager.save((Persistable)link); //将产品入库 product = checkIn(product);
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章