其他功能 > 製造流程管理 > 將 eBOM 轉換為 mBOM > 建立 mBOM > 「產生下游結構」動作概觀 > 使用案例:產生下游結構 > 使用案例 5:以特定結構產生未根據零件遍歷的下游結構
使用案例 5:以特定結構產生未根據零件遍歷的下游結構
假設 BOM 轉換器中存在以下結構:
Upstream Parent Part (Design)Downstream Parent Part (Manufacturing) 之間存在對等連結。
結構中除 Part C2 (Design) 以外的所有零件的零件類型均為 wt.part.WTPart
Part C2 (Design) 的零件類型為 ElectricalPart
欲根據結構追蹤產生下游結構,您可以使用規則檔案或內容檔案來指定轉換與重新建構規則。
使用規則檔案
{
"transformRules": [
{
"sourceType": "wt.part.WTPart",
"newAttributeMappings": [
[
"source.usage.AttributeNum1:String1",
"target.part.AttributeNum2:String2"
]
],
"targetType": "wt.part.WTPart",
"transformOption": "newPart"
},
{
"sourceType": "com.ptc.ElectricalPart",
"doNotTraverse": "true"
},
]
}
使用內容檔案
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="transformOption=newBranch"/>
<AddToProperty name="com.ptc.windchill.associativity.reconciliation.addusage.wt.part.WTPart" value="targetType=wt.part.WTPart"/>
<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="transformOption=newBranch"/>
<AddToProperty name="com.ptc.windchill.associativity.reconciliation.addusage.com.ptc.ElectricalPart" value="doNotTraverse=true"/>
針對上游中的所選零件啟動 動作後,Windchill 系統會遍歷所選零件下方的結構。此組態可確保:
如果 Windchill 系統偵測到零件使用關係屬性 AttributeNum1 設定為 String1 的零件,則會將偵測到的零件作為新分支新增至下游,使其位於零件類型為 wt.part.WTPart 且零件使用關係屬性 AttributeNum2 設定為 String2 的零件下方。
如果 Windchill 系統偵測到零件使用關聯類型為 ElectricalPart 的零件,則會將其新增為新分支。但是,系統不會遍歷偵測到的零件之下的結構。
在此情況下,不會新增與 ElectricalPart 對應相關的內容。ElectricalPartwt.part.WTPart 的子類型。ElectricalPart 會從 wt.part.WTPart 中繼承 GDS 對應內容。
下列結構會顯示在 BOM 轉換器中:
不會新增與 ElectricalPart 對應相關的內容。仍會將 Part C2 (Manufacturing) 作為新分支新增至零件使用關聯類型為 wt.part.WTPart 且零件使用關係屬性 AttributeNum2 設定為 String2 的下游零件下。這是因為,ElectricalPartwt.part.WTPart 的子類型。ElectricalPart 會從 wt.part.WTPart 中繼承 GDS 對應內容。GDS 對應內容是針對 wt.part.WTPart 定義的。
根據在 <AddToPropertyname="com.ptc.windchill.associativity.reconciliation.addusage.com.ptc.ElectricalPart" value="doNotTraverse=true"/> 中設定的條件,不會轉換 Part C2 (Design) 下方的結構,因為 Part C2 (Design)ElectricalPart
這是否有幫助?