Creating Multiple MPMPartToProcessPlanLinks
You can create single or multiple MPMPartToProcessPlanLink objects or subtypes to associate single or multiple Process Plans with a part object by specifying the OOTB attributes alternateNumber and isPreferred in the request body.
* 
You cannot create an MPMPartToProcessPlanLink between a part and a Standard Procedure.
To create an MPMPartToProcessPlanLink, you can specify only the latest iteration of a revision of the part object and Process Plan objects.
Example: Creating Multiple MPMPartToProcessPlanLinks
This example shows you how to create multiple MPMPartToProcessPlanLinks by specifying two Process Plan OIDs in the request body. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/MfgProcMgmt/Materials('OR:wt.part.WTPart:200285')/PTC.MfgProcMgmt.CreateMPMPartToProcessPlanLinks
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"PartToProcessPlanLink": [
{
"ProcessPlan@odata.bind": "ProcessPlans('OR:com.ptc.windchill.mpml.processplan.MPMProcessPlan:206120')"
},
{
"ProcessPlan@odata.bind": "ProcessPlans('OR:com.ptc.windchill.mpml.processplan.MPMProcessPlan:202050')"
}
]
}
Example: Creating an MPMPartToProcessPlanLink
This example shows you how to create an MPMPartToProcessPlanLink by specifying one Process Plan OID in the request body. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/MfgProcMgmt/Materials('OR:wt.part.WTPart:200285')/PTC.MfgProcMgmt.CreateMPMPartToProcessPlanLinks
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"PartToProcessPlanLink": [
{
"ProcessPlan@odata.bind": "ProcessPlans('OR:com.ptc.windchill.mpml.processplan.MPMProcessPlan:206120')"
}
]
}
Example: Creating an MPMPartToProcessPlanLink Subtype
This example shows you how to create a subtype of an MPMPartToProcessPlanLink object by specifying the subtype of a Process Plan OID in the request body. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/MfgProcMgmt/Materials('OR:wt.part.WTPart:200285')/PTC.MfgProcMgmt.CreateMPMPartToProcessPlanLinks
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"PartToProcessPlanLink": [
{
"ProcessPlan@odata.bind": "ProcessPlans('OR:com.ptc.windchill.mpml.processplan.MPMProcessPlan:202050')",
"@odata.type": "#subtype.PartToPPlink"
}
]
}
You can create single or multiple MPMPartToProcessPlanLink objects or its subtypes to associate single or multiple part objects with a Process Plan.
Example: Creating Multiple MPMPartToProcessPlanLinks for a Process Plan
This example shows you how to create multiple MPMPartToProcessPlanLinks for a Process Plan by specifying two part OIDs in the request body. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/MfgProcMgmt/ProcessPlans('OR:com.ptc.windchill.mpml.processplan.MPMProcessPlan:204040')/PTC.MfgProcMgmt.CreateMPMPartToProcessPlanLinks
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"PartToProcessPlanLink": [
{
"Material@odata.bind": "Materials('OR:wt.part.WTPart:204082')"
},
{
"Material@odata.bind": "Materials('OR:wt.part.WTPart:204093')"
}
]
}
Example: Creating an MPMPartToProcessPlanLink Subtype for a Process Plan
This example shows you how to create an MPMPartToProcessPlanLink subtype for a Process Plan by specifying the OID of the link subtype in the request body. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/MfgProcMgmt/ProcessPlans('OR:com.ptc.windchill.mpml.processplan.MPMProcessPlan:204040')/PTC.MfgProcMgmt.CreateMPMPartToProcessPlanLinks
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"PartToProcessPlanLink": [
{
"Material@odata.bind": "Materials('OR:wt.part.WTPart:204082')"
},
{
"Material@odata.bind": "Materials('OR:wt.part.WTPart:204093')",
"@odata.type": "#org.rnd.PartToProcessPlanSofttype"
}
]
}
Was this helpful?