Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
Hi there,
The Windchill REST API can be used to retrieve all drawings of a particular part.
Example
https://windchill.acme.com/Windchill/servlet/rest/structure/drawings/OR%3Awt.part.WTPart%3A102799?useParts=true
Result:
{
"items": [{
"id": "OR:wt.epm.EPMDocument:102871",
"typeId": "WCTYPE|wt.epm.EPMDocument"
}]
}
What is the other way around?
Which API request(s) must be used if you know a CAD document and want to receive all the parts associated with the drawing?
many Thanks!
@kfreydl below URL will give what you are looking for
GET <windchillserver>:<port>/Windchill/servlet/odata/CADDocumentMgmt/CADDocuments?$expand=PartAssociations($expand=RelatedParts)
Hi @amarsingh
Thanks for the hint. This might be the solution. ".../CADDocumentMgmt/CADDocuments" is supported since REST API 1.4. We're using 1.3, so I'll check this after updating to the latest version.