Copying and Pasting As New Part in the BOM Transformer
You can add a copied part and its upstream structure as a new part 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 of those as a new part to the specified downstream part. To copy and paste as a new part, 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 part 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 a Part from the Upstream Structure and Pasting It As a New Part to the Specified Downstream Part
This example shows you how to copy a part from the upstream structure and paste it as a new part to the specified downstream part using the DoNotDuplicate transformation and using the inline upstream and downstream navigation criteria. 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/PasteAsNewPart
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"TargetRoot": {
"ID": "OR:wt.part.WTPart:314713"
},
"TargetPath": "d62ee4e0-020c-4544-945f-204ec2f53ed3",
"SourceRoot": {
"ID": "OR:wt.part.WTPart:314579"
},
"TransformationDefinitions": [
{
"SourcePaths": [
"6e881bb3-b0dd-434d-b8ee-834847e53ea4"
],
"SourcePart@odata.bind": "Parts('OR:wt.part.WTPart:314605')",
"TransformationOption": "DoNotDuplicate",
"TransformationEntity": {
"BOMType": {
"Value": "costing",
"Display": ""
},
"AlternateNumber": {
"Value": "001",
"Display": ""
},
"Name": "TestPart",
"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"
}
]
}
}
The request adds the specified upstream part as a new part under the specified downstream part and creates a new equivalence link to the copied upstream part. The request does not add the upstream child parts to the new downstream part.
Example: Copying Multiple Parts with One of Those Having Existing Downstream Objects from the Upstream Structure and Pasting Them As New Parts to the Specified Downstream Part
This example shows you how to copy two upstream parts and paste each as a new part to the specified downstream part using inline upstream and downstream navigation criteria. In this example, the first upstream part WTPart:315202 has an existing downstream object WTPart:315380 that is not directly equivalent to it, but is considered by the user as equivalent to the upstream part. The second upstream part has child parts under it and is copied and pasted as a new part in the downstream structure 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 the upstream parts and paste each of those as a new part, use the following POST URI with the request body:
URI
POST Windchill/servlet/odata/BomTransformation/PasteAsNewPart
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')",
"ExistingDownstreamAssociations@odata.bind": [
"ExistingDownstreamAssociations('OR:wt.part.WTPart:315202|OR:wt.part.WTPart:315380')"
],
"ReviseExistingDownstream": true
},
{
"SourcePaths": [
"e9d87a1a-0326-473a-a6e9-adb0c4deb5d3"
],
"SourcePart@odata.bind": "Parts('OR:wt.part.WTPart:315285')",
"TransformationOption": "DuplicateWithoutPropagation",
"TransformationEntity": {
"@odata.type": "#PTC.ProdMgmt.SOFTPART1",
"Name": "1-2TestPart",
"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 object to the specified downstream part.
The request adds the second upstream part as a new part under the specified downstream part. The request adds the child parts under it to the new downstream part. The request also creates new equivalence links between the downstream BOM and the upstream BOM.
Example: Copying Multiple Parts with One of Those Having Existing Downstream Equivalent Objects from the Upstream Structure and Pasting Them As New Parts to the Specified Downstream Part
This example shows you how to copy two upstream parts and paste each as a new part to the specified 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 part in the downstream structure 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 the upstream parts and paste each of those as a new part, use the following POST URI with the request body:
URI
POST Windchill/servlet/odata/BomTransformation/PasteAsNewPart
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')",
"ExistingDownstreamAssociations@odata.bind": [
"ExistingDownstreamAssociations('OR:wt.associativity.EquivalenceLink:218285')"
],
"ReviseExistingDownstream": true
},
{
"SourcePaths": [
"e9d87a1a-0326-473a-a6e9-adb0c4deb5d3"
],
"SourcePart@odata.bind": "Parts('OR:wt.part.WTPart:315285')",
"TransformationOption": "DuplicateWithoutPropagation",
"TransformationEntity": {
"@odata.type": "#PTC.ProdMgmt.SOFTPART1",
"Name": "1-2TestPart",
"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 part under the specified downstream part. The request adds the child parts under it to the new downstream part. The request also creates new equivalence links between the downstream BOM and the upstream BOM.
Example: Copying a Part from the Upstream Structure and Pasting It As a New Part to the Specified Downstream Part in the Context of Change
This example shows you how to copy a part from the upstream structure and paste it as a new part to the specified downstream part in the context of change using the DoNotDuplicate transformation and using the inline upstream and downstream navigation criteria. Use the following POST URI with the request body:
URI
POST Windchill/servlet/odata/BomTransformation/PasteAsNewPart
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"TargetRoot": {
"ID": "OR:wt.part.WTPart:241546"
},
"TargetPath": "dedbbc61-71f2-4698-9a61-98daf27195c3",
"SourceRoot": {
"ID": "OR:wt.part.WTPart:237957"
},
"TransformationDefinitions": [
{
"SourcePaths": [
"4d3a9ebf-502e-400d-910f-be2aac1c8608"
],
"SourcePart@odata.bind": "Parts('OR:wt.part.WTPart:241447')",
"TransformationOption": "DoNotDuplicate",
"TransformationEntity": {
"BOMType": {
"Value": "costing",
"Display": ""
},
"AlternateNumber": {
"Value": "001",
"Display": ""
},
"Name": "TestPart",
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:114768')",
"Folder@odata.bind": "Folders('OR:wt.folder.SubFolder:221121')",
"View": "Manufacturing"
}
}
],
"ChangeOid": "VR:wt.change2.WTChangeOrder2:241233",
"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"
}
]
}
}
The request adds the specified upstream part as a new part under the specified downstream part. The request adds the modified downstream part to the Resulting Objects table of the change object specified in the ChangeOid attribute.
To see more details, expand the downstream parts, equivalent links, and usage links.