Use Case 12: Generate a Downstream Structure by Defining a Range
You can generate a downstream structure by defining a range. You can create an attribute and use it to define the range.
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 parts in the structure have the part type as wt.part.WTPart.
• The value of the preference Delimiter to Define the Range is set to >. This is the default value.
• The attribute GDS_Match is created on WTPart. Use this attribute to define the range.
• The value of the attribute source for Part D1 (Manufacturing) is set to buy.
To generate the downstream structure by defining a range, 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.GDS_Match:1>9",
"target.part.source:buy"
]
"targetType": "wt.part.WTPart",
"transformOption": "newBranch"
}
]
}
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.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=GDS_Match:1>9:source:buy"/>
| The GDS_Match value 1>9 describes the range. The value of the preference Delimiter to Define the Range is set to >. 1>9 means that the range is from 1 through 9. In this case, the system considers the following values for comparison: 1, 2, 3, 4, 5, 6, 7, 8, and 9. |
After you perform the Generate Downstream Structure action, the following structure appears in the BOM Transformer:
The system traverses the structure below the selected part. This configuration ensures that if the value of the GDS_Match attribute for an upstream part is from 1 through 9, then the upstream part is added as a new branch under the target matched downstream part.
Based on the specified criteria, Part C1 (Manufacturing), Part C2 (Manufacturing), and Part C5 (Manufacturing) are added as new parts under Part D1 (Manufacturing).
Part C3 and Part C4 are not transferred to the downstream view because the value of the GDS_Match attribute is not within the specified range in the properties.
Related information