Use Case 3: Generate a Downstream Structure By Mapping Multiple Part Usage Attributes
Consider that the following structure is present in the BOM Transformer:
An equivalent link exists between Upstream Parent Part (Design) and Downstream Parent Part (Manufacturing).
All the parts in the structure have the part type as wt.part.WTPart.
To generate the downstream structure by mapping multiple part usage attributes, you can specify the transformation and restructuring rules using rules file or properties file.
Using Rules File
{
"transformRules": [
{
"sourceType": "wt.part.WTPart",
"newAttributeMappings": [
[
"source.usage.AttributeNum1:10",
"target.usage.AttributeNum3:20"
],
[
"source.usage.AttributeNum2:20",
"target.usage.AttributeNum4:30"
]
],
"targetType": "wt.part.WTPart",
"transformOption": "newPart"
}
]
}
Using Properties File
1. Access the associativity.properties.xconf file located in Windchill/codebase/com/ptc/core/foundation/associativity.
2. Add the following restructuring rules:
<Property name="com.ptc.windchill.associativity.reconciliation.addusage.wt.part.WTPartUsageLink" multivalued="," default=""/>
<AddToProperty name="com.ptc.windchill.associativity.reconciliation.addusage.wt.part.WTPartUsageLink" value="targetType=wt.part.WTPart"/>
<AddToProperty name="com.ptc.windchill.associativity.reconciliation.addusage.wt.part.WTPartUsageLink" value="transformOption=newPart"/>
<AddToProperty name="com.ptc.windchill.associativity.reconciliation.addusage.wt.part.WTPartUsageLink" value="attributeMapping.rule1=AttributeNum1:10:AttributeNum3:20"/>
<AddToProperty name="com.ptc.windchill.associativity.reconciliation.addusage.wt.part.WTPartUsageLink" value="attributeMapping.rule2=AttributeNum2:20:AttributeNum4:30"/>
In case of properties that involve mapping, the mapping attributes specified for upstream and downstream must not be the same.
After you initiate the action on the selected part in the upstream, the Windchill system traverses the structure below the selected part. This configuration ensures that :
If the Windchill system detects a part with the part usage attribute AttributeNum1 set to 10, then the detected part is added in downstream as a new part, under the part whose part type is wt.part.WTPart and the part usage attribute AttributeNum3 is set to 20.
If the Windchill system detects a part with the part usage attribute AttributeNum2 set to 20, then the detected part is added in downstream, as a new part, under the part whose part type is wt.part.WTPart and the part usage attribute AttributeNum4 is set to 30.
The following structure appears in the BOM Transformer:
Part C1 (Manufacturing) and Part C2 (Manufacturing) are added as new parts under Part T1 (Manufacturing) and Part T2 (Manufacturing) respectively. This is because, Part T1 (Manufacturing) has part the usage attribute AttributeNum3 value set to 20 and Part T2 (Manufacturing) has the part usage attribute AttributeNum4 value set to 30.
Was this helpful?