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.

Options

hide a part

billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,022 PRO
I've been working on this for some time. So there's some history.

Anyone know how?

1st try:
one would think this would do it:

Turns out this ignores the post and the 'isHidden' parameter, the others work fine.


2nd try:
I was told to read the "Feature List API" which has nothing about the hiding a part.

You can access the information with the partstudios API:


But how do you update part metadata using the partstudios API?





Seems like I'm getting the run around, can you hide a part using the API.

Please tell me which API call?

Comments

  • Options
    billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,022 PRO
    The  "Update Metadata" API:




    So I change the name & the apperance and it updates. Try and change the isHidden property, nope doesn't work.

    Can you please fix this.




  • Options
    billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,022 PRO
    Can you please fix API Explorer?

    Updating the current document doesn't update d/w/e. When it was working, it was nice.



    Notice below the Document ID should be b7a7.....

  • Options
    billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,022 PRO
    Ok, this time using "Update Part metadata" API

    What form does the body need to be in? Let's use the "Get Parts" API and collect body:



    Now let's take that body and feed it into the "Update Part metadata" API:


    Notice the server returns a status code of 200, every things ok except the body is null. 


    I did change the name of the part using the "Update Part metadata" API and it change it:


    I also changed the property "isHidden" : true and nothing happened. 

    This is broken.


  • Options
    billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,022 PRO
    So how else can you make a part hidden using the API? Out of frustration I expanded all end points and performed a search on hidden:



    In the request body, it doesn't list "isHidden" as a property you can change. Searching the API there are no other calls that do it.


    Please add this to the "Update MetaData" API



Sign In or Register to comment.