Updating Attributes of Tooling
To update the attributes of an existing Tooling object or its subtype, you must first check out the object.
If you perform Undo Checkout on the Tooling object, the changes are rolled back. When you update the Tooling object, the version of the Tooling object will be iterated upon checking it in. You can specify the OID of any iteration/revision/view of the Tooling object or its subtype. You can update modeled and all other types of attributes, including IBAs such as enumerated lists.
To update an attribute, you must specify the value with its valid internal name. If a constraint is applied to the attribute, you must specify the internal name of the value specified in the constraint.
If you want to clear the value of an attribute, you can specify its value as null in the request.
If you do not specify an attribute in the request body, then the attribute retains its existing value.
* 
You cannot modify the following attributes: Name, Number, Category, Stop Effectivity Propagation.
Example: Updating Attributes of a Tooling Object
This example shows you how to update the attributes of a Tooling object. Use the following PATCH URI with the request body.
URI
PATCH /Windchill/servlet/odata/MfgProcMgmt/Toolings('OR:com.ptc.windchill.mpml.resource.MPMTooling:297891')
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"DimensionX": {
"Precision": 0,
"Unit": "m",
"Value": 0
},
"DefaultUnit": {
"Value": "kg"
},
"Description": "Description",
"Precision": {
"Precision": 0,
"Unit": "m",
"Value": 0
},
"WorkingVolumeY": {
"Precision": 0,
"Unit": "m",
"Value": 0
},
"WorkingVolumeZ": {
"Precision": 0,
"Unit": "m",
"Value": 0
},
"Source": {
"Value": "make"
},
"DimensionZ": {
"Precision": 0,
"Unit": "m",
"Value": 0
},
"WorkingVolumeX": {
"Precision": 0,
"Unit": "m",
"Value": 0
},
"DimensionY": {
"Precision": 0,
"Unit": "m",
"Value": 0
},
"Usage": {
"Value": "Production"
}
}
Example: Updating Attributes of Multiple Toolings
This example shows you how to update the attributes of two Tooling objects specified in the request body. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/MfgProcMgmt/UpdateToolings
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Toolings": [
{
"Precision": {
"Precision": 0,
"Unit": "m",
"Value": 0
},
"WorkingVolumeY": {
"Precision": 0,
"Unit": "m",
"Value": 0
},
"WorkingVolumeZ": {
"Precision": 0,
"Unit": "m",
"Value": 0
},
"Source": {
"Value": "make"
},
"DimensionZ": {
"Precision": 0,
"Unit": "m",
"Value": 0
},
"WorkingVolumeX": {
"Precision": 0,
"Unit": "m",
"Value": 0
},
"DimensionY": {
"Precision": 0,
"Unit": "m",
"Value": 0
},
"Usage": {
"Value": "Production"
},
"ID": "OR:com.ptc.windchill.mpml.resource.MPMTooling:297891",
"DimensionX": {
"Precision": 0,
"Unit": "m",
"Value": 0
},
"DefaultUnit": {
"Value": "kg"
},
"Description": "Description"
},
{
"Precision": {
"Precision": 0,
"Unit": "m",
"Value": 0
},
"WorkingVolumeY": {
"Precision": 0,
"Unit": "m",
"Value": 0
},
"WorkingVolumeZ": {
"Precision": 0,
"Unit": "m",
"Value": 0
},
"Source": {
"Value": "make"
},
"DimensionZ": {
"Precision": 0,
"Unit": "m",
"Value": 0
},
"WorkingVolumeX": {
"Precision": 0,
"Unit": "m",
"Value": 0
},
"DimensionY": {
"Precision": 0,
"Unit": "m",
"Value": 0
},
"Usage": {
"Value": "Production"
},
"ID": "OR:com.ptc.windchill.mpml.resource.MPMTooling:297891",
"DimensionX": {
"Precision": 0,
"Unit": "m",
"Value": 0
},
"DefaultUnit": {
"Value": "kg"
},
"Description": "Description"
}
]
}
Updating Toolings in Context of Change
This example shows you how to update two Toolings in the context of Change. In this example, one change task object is specified for each Tooling object in the request body. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/MfgProcMgmt/UpdateToolings
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Toolings": [
{
"ID": "OR:com.ptc.windchill.mpml.resource.MPMTooling:205579",
"Description": "Description",
"ResultedByObjects@odata.bind": [
"ChangeTasks('VR:wt.change2.WTChangeActivity2:205227')"
]
},
{
"ID": "OR:com.ptc.windchill.mpml.resource.MPMTooling:205603",
"Description": "Description",
"ResultedByObjects@odata.bind": [
"ChangeTasks('VR:wt.change2.WTChangeActivity2:205227')"
]
}
]
}
The request updates and adds the modified Tooling object as a Resultant object to the specified Change object.
Was this helpful?