Use Case 17: Generate a Downstream Structure and Create Equivalent Link Based on Template
Using a downstream template structure and rules file, you can create equivalent links for the upper structure and also move nodes under the downstream structure.
Consider that the following structure is present in the BOM Transformer:
Downstream structure does not exist.
MainAssembly1 (Design) has the attribute PartAttribute with the value set to value1.
To generate the downstream structure based on template, you can specify the downstream template structure and the transformation and restructuring rules in the rules file or properties file. To create an equivalent link between specific parts, you can specify the equivalent link rules in the rules file or properties file using the equivalentLinkRules configuration. This configuration is not used for transformation.
Downstream Template Structure
When using a template, you can specify a suffix for the parts in the template in the Number Suffix box in the Generate Downstream Structure dialog box. If not specified, the part number is auto generated. In this example, the suffix specified is “_1”.
Additionally, you need to select the downstream view for the parts in the template using the Downstream View list in the Generate Downstream Structure dialog box. If not specified, the default view displayed in the Downstream View list is considered. In this example, the view specified is manufacturing.
Using Rules File
{
"equivalentLinkRules": [
{
"sourceType": "wt.part.WTPart",
"sourceAttributes": ["genericType=dynamic"],
"newAttributeMappings": [
["source.part.PartAttribute:value1","target.part.PartAttribute:value2"]
],
"targetType": "org.rnd.PartSubType1"
}
],
"transformRules": [
{
"sourceType": "wt.part.WTPart",
"sourceAttributes": ["genericType=standard"],
"newAttributeMappings": [
["source.part.name:Level1*","target.part.name:Level1_MBOMAssembly"],
["source.part.name:Level2*","target.part.name:Level2_MBOMAssembly"],
["source.part.name:Level3*","target.part.name:Level3_MBOMAssembly"]
],
"transformOption": "addSame",
"targetType": "org.rnd.PartSubType1"
}
]
}
In the newAttributeMappings configuration, an asterisk (*) is used as a delimiter to indicate part names that start with “Level1”, “Level2”, and “Level3”. To use asterisk (*) as a delimiter, it must be specified as the delimiter value in the Delimiter to Define the Range preference. For more information on this preference, see Preferences in MPMLink.
After you perform the Generate Downstream Structure action, the following structure appears in the BOM Transformer:
Based on the downstream template structure and the criteria specified in the rules file or properties file, the equivalent link and downstream structure is generated in the following manner:
The suffix “_1” is added for the downstream parts that are components of the template.
Upstream parts with names starting with “Level1”—Level1_Part1 (Design) and Level1_Part5 (Design)—are added as is under the downstream part with the name “Level1_MBOMAssembly”.
Upstream parts with names starting with “Level2”—Level2_Part2 (Design) and Level2_Part4 (Design)—are added as is under the downstream part with the name “Level2_MBOMAssembly”.
Upstream parts with names starting with “Level3”—Level3_Part3 (Design) and Level3_Part6 (Design)—are added as is under the downstream part with the name “Level3_MBOMAssembly”.
As per the equivalentLinkRules configuration, an equivalent link is created between MainAssembly1 (Design) and MBOM_MainAssembly2 (Manufacturing) that have PartAttribute value as value1 and value2, respectively.
Other equivalent links are created between the newly added downstream parts and relevant upstream parts.
Was this helpful?