Use Case 7: Generate a Downstream Structure by Skipping a Part Based on the Part Usage Attribute
Consider that the following structure is present in the BOM Transformer:
An equivalent link exists between the Upstream Parent Part (Design) and Downstream Parent Part (Manufacturing).
All the parts in the structure, except for Part T2 (Manufacturing), have the part type as wt.part.WTPart.
Part T2 (Manufacturing) has the part type as ElectricalPart.
To generate the downstream structure by skipping a part based on the part usage attribute, 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.Attribute1:String2",
"target.part.Attribute2:String1"
]
],
"targetType": "wt.part.WTPart",
"transformOption": "newPart",
"skipAttributes":[
"Attribute1:String1"
]
}
]
}
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="transformOption=newPart"/>
<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="skipAttribute.Attribute1=String1"/>
<AddToProperty name="com.ptc.windchill.associativity.reconciliation.addusage.wt.part.WTPartUsageLink" value="attributeMapping.rule1=Attribute1:String2:Attribute2:String1"/>
* 
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 in upstream with the part usage attribute Attribute1 set as String2, then it will be pasted in the downstream as a new part, under the part whose part type is wt.part.WTPart and part usage attribute Attribute2 is set as String1.
If the Windchill system detects a part in the upstream with the part usage attribute Attribute1 set as String1, then the part is skipped and is not added in the downstream. However, the structure below the detected part is traversed.
The following structure appears in the BOM Transformer:
Part C2 (Manufacturing) and Part C3 (Manufacturing) are added as new parts under Part T1 (Manufacturing) as its part type is wt.part.WTPart. No part is added under Part T2 (Manufacturing) as its part type is not wt.part.WTPart and part usage attribute Attribute2 is set as String1.
Was this helpful?