Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

POSSIBLE BUG: API UPDATE FEATURE CALL FOR VARIABLE

joshua_foxworthjoshua_foxworth Member, Developers Posts: 19
I have an app that lets users set values that are then sent to onshape documents where variables are then set to those values. This has been working for some time and continues to work for most Onshape documents and parts. However, I made some mistakes when trying out some new code and had to manually adjust a few of the variable values. After doing this, the API call to update the values of those variables results in a 400 error "Parameter angleValue in feature XXXXX of type Variab (truncated...)"

While other documents and other parts within this document still work, I get this same error for all variable values in the parts I manually opened (within the normal Onshape part studio).

Here is a link to one of the parts that isn't working...

https://cad.onshape.com/documents/97434099131350e534d87e91/w/f983dd69e4287aef89e7ff21/e/c34c3b1109e483f3da5fe799

Has there been a change that requires a change to the API call? I don't see any in the documentation, although the appearance of the API Explorer changed today.

Comments

  • jonah_sundahljonah_sundahl Member Posts: 1
    Are you trying the call in the API explorer, or is your app making the call?
  • mark_noyesmark_noyes Member, Onshape Employees, Developers Posts: 21
    Please check out Example 2 in the Feature list API topic in the developer portal help. Several months ago the parameters in the assignVariable feature were changed incompatibly. You didn't include information about what your post body looks like so it's hard to tell if this is what you are running into but if your code was originally written more than a few months ago then you might be running into this.
  • joshua_foxworthjoshua_foxworth Member, Developers Posts: 19
    That was indeed the issue. Interesting that the process seemed to work even after Onshape made the changes until I manually changed the parameters in Onshape. Appreciate the help.
Sign In or Register to comment.