ユースケース 14: 部品タイプに基づいて下流構造を生成
BOM トランスフォーマに以下の構造が存在するとします。
下流構造は存在しません。
上流構造内の各部品は WTPart の異なるサブタイプに属します。
PartSubType1PartSubType2PartSubType3、および PartSubType4WTPart のサブタイプです。
部品タイプに基づいて下流構造を生成するには、規則ファイルまたはプロパティファイルを使用して変換規則と再構築規則を指定できます。
規則ファイルを使用
テキストファイルで、次の規則を JSON フォーマットで追加します。
{
"transformRules": [
{
"sourceType": "wt.part.WTPart",
"transformOption": "newBranch"
},
{
"sourceType": "org.rnd.PartSubType2",
"transformOption": "addSame"
},
{
"sourceType": "org.rnd.PartSubType4",
"doNotTraverse":"true",
"doNotTransform":"true"
}
]
}
プロパティファイルを使用
1. Windchill/codebase/com/ptc/core/foundation/associativity にあるファイル associativity.properties.xconf にアクセスします。
2. 以下の再構築規則を追加します。
<Property name="com.ptc.windchill.associativity.reconciliation.addusage.wt.part.WTPart.rule1" multivalued="," default=""/>
<AddToProperty name="com.ptc.windchill.associativity.reconciliation.addusage.wt.part.WTPart.rule1" value="transformOption=newBranch"/>
<Property name="com.ptc.windchill.associativity.reconciliation.addusage.org.rnd.PartSubType2.rule1" multivalued="," default=""/>
<AddToProperty name="com.ptc.windchill.associativity.reconciliation.addusage.org.rnd.PartSubType2.rule1" value="transformOption=addSame"/>
<AddToProperty name="com.ptc.windchill.associativity.reconciliation.addusage.org.rnd.PartSubType4.rule1" value="doNotTransform=true"/>
<AddToProperty name="com.ptc.windchill.associativity.reconciliation.addusage.org.rnd.PartSubType4.rule1" value="doNotTraverse=true"/>
「下流構造を生成」操作を実行すると、BOM トランスフォーマに次の構造が表示されます。
規則ファイルまたはプロパティファイルで指定されている基準に基づいて、下流構造が以下の方法で生成されます。
タイプが WTPart である SubType1_Assembly (Manufacturing)PartSubType3_Assm1 (Manufacturing)PartSubType3_Assm2 (Manufacturing)、および SubAssembly1 (Manufacturing) は新規ブランチとして追加されます。
タイプが PartSubType2 である SubType2_Part1(Design)SubType2_Part2 (Design)SubType2_Part3 (Design)、および SubType2_Part4 (Design) は各部品の下にそのまま追加されます。
PartType4SubType4_Assm1 (Design)SubType4_Assm1 (Design) は変換もスキャンもされません。このため、子部品 SubType2_Part5 (Design) も変換されません。
これは役に立ちましたか?