Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
Hi cko,
Thank you for your question.
Your post appears well documented but has not yet received any response. I am replying to raise awareness. Hopefully, another community member will be able to help.
Thanks & Regards,
Vivek N
Community Moderation Team.
Since you haven't pasted an error it's difficult to find the exact problem. It could be that you forgot to set the binding of the odata type?
This should work:
{
"@odata.type": "#PTC.ProdMgmt.Part",
"AssemblyMode": {
"Value": "component"
},
"EndItem": false,
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:131439')",
"DefaultUnit": {
"Value": "ea"
},
"DefaultTraceCode": {
"Value": "0"
},
"View": "Design",
"GatheringPart": false,
"Source": {
"Value": "make"
},
"PhantomManufacturingPart": false,
"Name": "Test Rest"
}
Thank you
I tested WRS but I get the same error. The error is below (T.T)
If WRS passes the test, I want to develop it with excel VBA
Error: 400
Response body
*******************************************************************
{
"error": {
"code": "MALFORMED_BINDING_LINK",
"message": "The format of 'binding link' is incorrect."
}
}
*******************************************************************
Response headers
*******************************************************************
connection: close
content-type: application/json;odata.metadata=minimal
date: Thu,22 Aug 2024 21:49:27 GMT
odata-version: 4.0
server: Apache
transfer-encoding: chunked
vary: Accept-Encoding,User-Agent
x-content-type-options: nosniff
x-do-not-compress-this: 1
x-frame-options: SAMEORIGIN
x-ptc-connected:
*******************************************************************
does it work inside the Windchill WRS page? Or with which program are you running the code? The easiest way is to run it inside Windchill. If the call is failing there, you probably have a problem with an OIR?
Thank you
Tested on Windchill PDMLink 13.0 WRS.
ORI (Object Initialization Rules) used existing settings.
We will test by adding the default folder of Context.
Unfortunately,
It seems that no user has succeeded in this.
- JSON format is a bit strict, make sure the format is correct
- get it working with 'export importable' first, then try WRS
- as others have said, get it working in the WRS web page first before VBA
- experiment with the GET api's first before learning the POST api's
- VBA? you might find python easier to use
Hope this helps.
thank you
I have a question
1. get it working with 'export importable' first
-> Where do I configure Windchill? No separate settings were made.
2. The reason we use VBA is because we use "VBA-JSON"
-> Even non-programmers can easily create their own programs. That's why I like VBA.
I'll also study Python (^_^)
-> I created a VBA code using Chat-GTP/Bard.
thank you
Did you export an importable yet?
You used 'Chat-GTP/Bard'? That might be a good start, but .. but ..
Hi thanks, it was helpful for me. Thanks for your efforts.