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);
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章