Updating Attributes on a Resource Uses Link
To update a Resource Uses link, you must first check out the parent resource.
This example shows you how to update attributes on a WTPartUsageLink (Resource Uses link between parent resource and child part) for a Tooling object by specifying the parent Tooling OID and the associated WTPartUsageLink OID in the request URI. Use the following PATCH URI with the request body.
URI
PATCH /Windchill/servlet/odata/MfgProcMgmt/MfgProcMgmt/Resources('OR:com.ptc.windchill.mpml.resource.MPMTooling:198087')/Uses('OR:wt.part.WTPartUsageLink:200153')
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Quantity": 4,
"Unit": {
"Value": "ea",
"Display": "Each"
},
"FindNumber": "100",
"LineNumber": 14,
"TraceCode": {
"Value": "0",
"Display": "Untraced"
}
}
Example: Updating a Specific Occurrence on a Specific Resources Uses link
This example shows you how to update a specific occurrence on a WTPartUsageLink (Resources Uses link between parent resource and child part) for a Tooling object by specifying the parent Tooling OID and associated WTPartUsageLink OID and PartUsesOccurrence OID in the request URI. Use the following PATCH URI with the request body.
URI
PATCH /Windchill/servlet/odata/MfgProcMgmt/MfgProcMgmt/Resources('OR:com.ptc.windchill.mpml.resource.MPMTooling:198087')/Uses('OR:wt.part.WTPartUsageLink:202103')/Occurrences('OR:wt.part.PartUsesOccurrence:202112')
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"ReferenceDesignator": "R60",
"Location": {
"PointX": 0,
"PointY": 1,
"PointZ": 1,
"PointUnit": "m",
"AngleX": 1.04,
"AngleY": 1.04,
"AngleZ": 1.04,
"AngleUnit": "r"
}
}