Creating a Part Describe Link Between an Existing Part and Document
A part describe link exists between an existing part and document. The request creates the part describe link between the specified part iteration and document iteration.
You can create a part describe link by specifying the part OID in the request URI and the document OID in the request body. You can also create a part describe link with IBA attributes by specifying the defined IBA attributes of type String in the request body.
|
• When the Part to Document Association Logic preference is set to No in the Preference Management utility in Windchill,
◦ You cannot create a part describe link for a document of type Reference.
◦ When a part describe link exists for an older revision of a document and a new revision of the document is added, the request removes the link for the older revision and creates only the part describe link for the new revision of the document.
• When the Part to Document Association Logic preference is set to Yes in the Preference Management utility in Windchill,
◦ You can create a part describe link for any of the document types.
◦ When a part describe link exists for an older revision of a document and a new revision of the document is added, the request creates the part describe link for the new revision of the document and also carries forward the link for the older revision.
|
Example: Creating a Part Describe Link
The following example shows you how to create a part describe link for the part OID specified in the request URI.
Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/ProdMgmt/ProdMgmt/ProdMgmt/Parts('OR:wt.part.WTPart:278438')/DescribedBy
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"DescribedBy@odata.bind": "Documents('OR:wt.doc.WTDocument:286156')"
}
The request creates a part describe link between the specified part and document, and returns the details of the link in the response.
The specified document is added to the Described By Documents table in the Related Objects tab available for the specified part in Windchill.
Example: Creating a Part Describe Link with Attributes
The following example shows you how to create a part describe link with an IBA attribute for the part OID specified in the request URI.
Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/ProdMgmt/ProdMgmt/ProdMgmt/Parts('OR:wt.part.WTPart:278434')/DescribedBy
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"DescribedBy@odata.bind": "Documents('OR:wt.doc.WTDocument:286156')",
"TestStringIBA1": "TestValue1"
}
The request creates a part describe link between the specified part and document with the TestStringIBA1 attribute and returns the details of the link in the response.
The specified document is added to the Described By Documents table in the Related Objects tab available for the specified part in Windchill.