Copying and Pasting As New Branch in the BOM Transformer
You can add a copied part and its upstream structure as a new branch iteration to a downstream part by specifying the required attributes and inline or specific upstream and downstream navigation criteria in the request body. If you do not specify the navigation criteria, the System Default filter is applied.
You can copy a single or multiple parts from the upstream structure, and paste each part as a new branch iteration to the specified downstream part. To copy and paste as a new branch, you must first check out the downstream part to which you want to add the copied parts.
You can also add a copied part and its upstream structure as a new branch iteration to the specified downstream part in the context of change (change task or change notice).
* 
You can use the following API to fetch additional information of a part in the BOM structure required for this request:
POST /Windchill/servlet/odata/BomTransformation/XBOMParts('<RootPartOID>')/PTC.BomTransformation.GetManufacturingBOM?$expand=Components($levels=max)
Example: Copying Multiple Parts from the Upstream Structure and Pasting Each Part as a New Branch to the Specified Downstream Part
This example shows you how to copy three parts from the upstream structure and paste each as a new branch to the specified downstream part using the DoNotDuplicate, DuplicateWithPropagation, and DuplicateWithoutPropagation transformations, respectively. In this example, the source root part is the root part of the upstream structure and the target root part is the root part of the downstream structure. Use the following POST URI with the request body:
URI
POST Windchill/servlet/odata/BomTransformation/PasteAsNewBranch
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"TargetPath": "14a48173-1b66-4d89-b33e-742d1e3c2618|550d59e4-9a38-4c08-96ae-5378bb51e3ac",
"TargetRoot": {
"ID": "OR:wt.part.WTPart:220374"
},
"SourceRoot": {
"ID": "OR:wt.part.WTPart:220266"
},
"TransformationDefinitions": [
{
"SourcePaths": [
"6cd8dce6-fa45-4f61-ac08-63a95bebff26"
],
"SourcePart@odata.bind": "Parts('OR:wt.part.WTPart:220419')",
"TransformationEntity": {
"View": "Manufacturing"
},
"TransformationOption": "DoNotDuplicate"
},
{
"SourcePaths": [
"6542dae6-gew4-4312-r125-53tgfds542fa"
],
"SourcePart@odata.bind": "Parts('OR:wt.part.WTPart:435214')",
"TransformationEntity": {
"View": "Manufacturing"
},
"TransformationOption": "DuplicateWithPropagating"
},
{
"SourcePaths": [
"3442d124a-gew4-rf31-fds2-52fsqwts542fa"
],
"SourcePart@odata.bind": "Parts('OR:wt.part.WTPart:512355')",
"TransformationEntity": {
"View": "Manufacturing"
},
"TransformationOption": "DuplicateWithoutPropagating"
}
],
"DownstreamNavigationCriteria": {
"ApplicableType": "PTC.ProdMgmt.Part",
"ApplicationName": null,
"ApplyToTopLevelObject": false,
"Centricity": false,
"ConfigSpecs": [
{
"@odata.type": "#PTC.NavCriteria.WTPartStandardConfigSpec",
"WorkingIncluded": true,
"View": "Manufacturing",
"LifeCycleState": null,
"Variation1": null,
"Variation2": null
}
],
"CreatedOn": "2022-07-21T16:18:31+02:00",
"Filters": [],
"HideUnresolvedDependents": false,
"ID": "OR:wt.filter.NavigationCriteria:198326",
"LastModified": "2022-07-21T16:18:31+02:00",
"Name": "NCDown1",
"SharedToAll": false,
"UseDefaultForUnresolved": false
},
"UpstreamNavigationCriteria": {
"ApplicableType": "PTC.ProdMgmt.Part",
"ApplicationName": null,
"ApplyToTopLevelObject": false,
"Centricity": false,
"ConfigSpecs": [
{
"@odata.type": "#PTC.NavCriteria.WTPartStandardConfigSpec",
"WorkingIncluded": true,
"View": "Design",
"LifeCycleState": null,
"Variation1": null,
"Variation2": null
}
],
"CreatedOn": "2022-07-21T16:18:23+02:00",
"Filters": [],
"HideUnresolvedDependents": false,
"ID": "OR:wt.filter.NavigationCriteria:198322",
"LastModified": "2022-07-21T16:18:23+02:00",
"Name": "NCUp1",
"SharedToAll": false,
"UseDefaultForUnresolved": false
}
}
The request adds each specified upstream part as a new branch iteration under the specified downstream part. The request also creates new equivalence links between the downstream BOM and upstream BOM.
Example: Copying Multiple Parts with One of Those Having Existing Downstream Equivalent Objects from the Upstream Structure and Pasting Each Part as a New Branch to the Specified Downstream Part
This example shows you how to copy two upstream parts and paste each part as a new branch to a downstream part using inline upstream and downstream navigation criteria. In this example, the first upstream part has an existing downstream equivalent object. The second upstream part has child parts under it and is copied and pasted as a new branch to the specified downstream part using the DuplicateWithoutPropagation transformation.
* 
To fetch the equivalence network information required for this request, use the following API:
POST /Windchill/servlet/odata/BomTransformation/GetEquivalenceNetworkForParts?$expand=EquivalenceNetwork($expand=EquivalenceLink)
To copy upstream parts and paste each of those as a new branch, use the following POST URI with the request body:
URI
POST Windchill/servlet/odata/BomTransformation/PasteAsNewBranch
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"TargetRoot": {
"ID": "OR:wt.part.WTPart:315352"
},
"TargetPath": "dd437b96-848f-496e-a3ac-21e44c85f6ed",
"SourceRoot": {
"ID": "OR:wt.part.WTPart:315150"
},
"TransformationDefinitions": [
{
"SourcePaths": [
"5e8ae511-b433-4448-b19e-7e5ac0ef38c4"
],
"SourcePart@odata.bind": "Parts('OR:wt.part.WTPart:315245')",
"TransformationOption": "DoNotDuplicate",
"ExistingDownstreamAssociations@odata.bind": [
"ExistingDownstreamAssociations('OR:wt.associativity.EquivalenceLink:218274')"
],
"ReviseExistingDownstream": true,
"TransformationEntity": {
"Name": "TestPart1",
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:113033')",
"Folder@odata.bind": "Folders('OR:wt.folder.SubFolder:314405')",
"View": "Manufacturing"
}
},
{
"SourcePaths": [
"e9d87a1a-0326-473a-a6e9-adb0c4deb5d3"
],
"SourcePart@odata.bind": "Parts('OR:wt.part.WTPart:315285')",
"TransformationOption": "DuplicateWithoutPropagation",
"TransformationEntity": {
"Name": "TestPart2",
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:113033')",
"Folder@odata.bind": "Folders('OR:wt.folder.SubFolder:314405')",
"View": "Manufacturing"
}
}
],
"DownstreamNavigationCriteria": {
"HideUnresolvedDependents": false,
"Centricity": false,
"Filters": [],
"ApplicationName": null,
"UseDefaultForUnresolved": false,
"SharedToAll": true,
"ApplicableType": "PTC.ProdMgmt.Part",
"ApplyToTopLevelObject": false,
"ConfigSpecs": [
{
"@odata.type": "#PTC.NavCriteria.WTPartStandardConfigSpec",
"Variation1": null,
"Variation2": null,
"LifeCycleState": null,
"WorkingIncluded": true,
"View": "Manufacturing"
}
]
},
"UpstreamNavigationCriteria": {
"HideUnresolvedDependents": false,
"Centricity": false,
"Filters": [],
"ApplicationName": null,
"UseDefaultForUnresolved": false,
"SharedToAll": true,
"ApplicableType": "PTC.ProdMgmt.Part",
"ApplyToTopLevelObject": false,
"ConfigSpecs": [
{
"@odata.type": "#PTC.NavCriteria.WTPartStandardConfigSpec",
"Variation1": null,
"Variation2": null,
"LifeCycleState": null,
"WorkingIncluded": true,
"View": "Design"
}
]
}
}
For the first upstream part the request reuses, revises and adds the existing downstream equivalent object to the specified downstream part.
The request adds the second upstream part as a new branch iteration under the specified downstream part. The request adds its child parts to the new branch iteration. The request also creates new equivalence links between the downstream BOM and the upstream BOM.
Example: Copying an Upstream Part and Pasting It as a New Branch to the Specified Downstream Part in the Context of Change
This example shows you how to copy an upstream part and paste it as a new branch to the specified downstream part in the context of change using the DuplicateWithPropagation transformation. Use the following POST URI with the request body:
URI
POST Windchill/servlet/odata/BomTransformation/PasteAsNewBranch
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"TargetPath": "fb8c83b2-60c4-4681-a37c-bca2a684999b",
"DownstreamNavigationCriteria": {
"ID": "OR:wt.filter.NavigationCriteria:191222"
},
"UpstreamNavigationCriteria": {
"ID": "OR:wt.filter.NavigationCriteria:191218"
},
"TargetRoot": {
"ID": "OR:wt.part.WTPart:233977"
},
"SourceRoot": {
"ID": "OR:wt.part.WTPart:233772"
},
"TransformationDefinitions": [
{
"SourcePaths": [
"1cb41267-36c3-4b64-8c18-02cab39a2c17"
],
"SourcePart@odata.bind": "Parts('OR:wt.part.WTPart:233907')",
"TransformationEntity": {
"View": "Manufacturing"
},
"TransformationOption": "DuplicateWithPropagation"
}
],
"ChangeOid": "VR:wt.change2.WTChangeOrder2:237661"
}
The request adds the specified upstream part as a new branch iteration under the specified downstream part. The request adds the modified downstream branch iteration to the Resulting Objects table of the change object specified in the ChangeOid attribute.
To see more details, expand the upstream part, new downstream branch iteration, equivalent links, and usage links.
URI with Expand
POST Windchill/servlet/odata/BomTransformation/PasteAsNewBranch?$expand=UsageLink,EquivalenceLink,DownstreamPart,UpstreamPart
Was this helpful?