Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape, CAD, maker project and design.

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.

A little help please

billy2billy2 Member, OS Professional, Mentor, Developers Posts: 1,079 PRO
I've just posted a new idea and would like it promoted to the top. I don't think it'll get a lot of support on it's own so I'm asking for your help.

https://forum.onshape.com/discussion/10682/api-update-drawing#latest

Drawings lie dormant until someone opens them and clicks on the update button. But what if you have a robot that can change parts for you? That robot can't click on that update button in a drawing tab so all it's documents are stagnant until a human takes the time to open each tab and clicks on update.

Please add update drawing to the api.

Can you please navigate to the link above and vote this enhancement up, please.
Tagged:

Comments

  • mbartlett21mbartlett21 Member Posts: 1,141 EDU
    Could you use the network panel in the developer panel in chrome to see what api requests are made to update drawings when a version is created?
    MB (I make FeatureScripts: view FS)
  • billy2billy2 Member, OS Professional, Mentor, Developers Posts: 1,079 PRO
    I don't think I'd want a chrome app scanning the onshape page finding that update button and clicking it. 

    I was hoping app elements might offer some update trick. But I've been told the drawing update button isn't currently accessible in the api.




  • mbartlett21mbartlett21 Member Posts: 1,141 EDU
    I am meaning in the chrome F12 developer panel (Firefox or other browsers may have this as well).
    You can see what api requests are made and copy the api request to your app (this was how I found out about getting folders from the api in another thread)
    MB (I make FeatureScripts: view FS)
  • billy2billy2 Member, OS Professional, Mentor, Developers Posts: 1,079 PRO
    I understand now,

    When I click the drawing update icon, a call is made to google analytics:


    The provisional header looks like a onshape call, do you know how to make this call? 

  • mbartlett21mbartlett21 Member Posts: 1,141 EDU
    I was meaning when you click the drawing update icon in the create version dialog
    MB (I make FeatureScripts: view FS)
  • mbartlett21mbartlett21 Member Posts: 1,141 EDU
    @billy2

    You can find out-of-date elements using 
    https://cad.onshape.com/api/documents/d/DID/w/WID/outofdatedelements
    Then you can send a POST call to 
    https://cad.onshape.com/api/documents/d/DID/w/WID/syncApplicationElements?applicationElementIds=EID1&applicationElementIds=EID2&description=Update+drawings
    to update the drawings, repeating the applicationElementIds parameter to add elements as necessary

    EID: element id
    DID: document id
    WID: workspace id
    MB (I make FeatureScripts: view FS)
  • billy2billy2 Member, OS Professional, Mentor, Developers Posts: 1,079 PRO
    buried right now, will try soon

    thanks
  • billy2billy2 Member, OS Professional, Mentor, Developers Posts: 1,079 PRO
    I've got the get call working:


    This is looking really promising, I'm working on the post call next thinking it'll work also.


Sign In or Register to comment.