使用案例 4:沒有以零件類型為基礎的 BOM 轉換
請考慮這樣一種情境:即 BOM 轉換器中存在以下結構:
Upstream Parent Part (Design)Downstream Parent Part (Manufacturing) 之間存在對等連結。
結構中除 Part C2 (Design) 以外的所有零件的零件類型均為 wt.part.WTPart
結構中的 Part C2 (Design) 零件類型為 ElectricalPart
1. 存取位於 Windchill/codebase/com/ptc/core/foundation/associativity 中的 associativity.properties.xconf 檔案。
2. 新增下列重新建構規則:
<Property name="com.ptc.windchill.associativity.reconciliation.addusage.wt.part.WTPart" multivalued="," default=""/>
<AddToProperty name="com.ptc.windchill.associativity.reconciliation.addusage.wt.part.WTPart" value="attributeMapping.rule1=AttributeNum1:String1:AttributeNum2:String2"/>
* 
對於涉及對應的內容,為上游與下游指定的對應屬性必須不同。
<Property name="com.ptc.windchill.associativity.reconciliation.addusage.com.ptc.ElectricalPart" multivalued="," default=""/>
<AddToProperty name="com.ptc.windchill.associativity.reconciliation.addusage.com.ptc.ElectricalPart" value="doNotTransform=true"/>。此內容優先于其他內容
* 
針對上游中的所選零件啟動 動作後,Windchill 系統會遍歷所選零件下方的結構。此組態可確保:
如果 Windchill 系統偵測到零件使用關係屬性 AttributeNum1 設定為 String1 的零件,則會將偵測到的零件作為新零件新增至下游,使其位於零件類型為 wt.part.WTPart 且零件使用關係屬性 AttributeNum2 值設定為 String2 的零件下方。
如果 Windchill 系統偵測到零件類型為 ElectricalPart 的零件,則不會將零件新增至下游中的任何零件之下。
3. 選取 Upstream Parent Part (Design),然後按一下中間窗格工具列中的
4. 下列結構會顯示在 BOM 轉換器中:
* 
Part C1 (Manufacturing) 會在 Part T1 (Manufacturing) 下方新增為新零件,因為 Part T1 (Manufacturing) 符合在內容中設定的條件。
Part C2 (Design) 的零件使用關係屬性 AttributeNum1 設定為 String1。但是,它不會新增到下游中,因為它是電子零件。在此情況下,<AddToPropertyname="com.ptc.windchill.associativity.reconciliation.addusage.com.ptc.ElectricalPart" value="doNotTransform=true"/> 會優先于其他內容。
這是否有幫助?