Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- 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
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.
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.
0
Comments
IR for AS/NZS 1100
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.
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)
IR for AS/NZS 1100
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?
IR for AS/NZS 1100
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
IR for AS/NZS 1100
thanks
This is looking really promising, I'm working on the post call next thinking it'll work also.
@mbartlett21 has suggested using chrome's developer console to hack the call that updates a drawing(s) and I'll expose what he's talking about to help explain the basic concepts of the cloud (servers talking to servers).
Before the call:
Above you see onshape and the drawing update dialog found in create version dialog. You'll also see Chrome's developer console on the bottom of the screen. I'm going to turn Chrome's recorder on and capture the calls made from my client browser and the onshape server.
After the call:
So you can see a ton of calls between client and server after clicking on the update button. At the top of the list is the post call that I need to build and construct my app.
The request url for the post is:
If you cut'n paste the address above into your browser, you'll get an error because you don't have the permissions.
@mbartlett21 how'd you'd figure this out?
So I need to construct the post, wait for the onshape servers to update drawing, create a pdf output, add pdf to my page. Oh yeah, I need to flash "updating drawing" while this going on.
The bad news is that part studios & drawings with configurations aren't tied together. Changing the part studio won't change the configuration in a drawing. I'm not complaining about this because from a user's perspective it's really powerful. But from a programmers perspective, this sucks.
I guess my request for "drawing update" should have read "change drawing view configuration".
@mbartlett21 I tried your hack to figure out how to change a drawing view configuration but it didn't seem meaningful. Do you have any other tricks?
Is there any way to tie the drawing view to a specific part studio configuration?
Thanks
When you want to use a part with a configuration, inside an assy, derived part or drawing; you have to define the configuration for the part being used. This functionality isn't currently accessible in the API.
The closest I got was to "update feature" in a derived part feature but this only caused the feature to error. I could only break things.
If anyone knows how to update the derived part configuration using "update feature" please let me know.
Using configurations seems like the best option to control assemblies, derived parts & drawings. It's worth the wait for the API to catch up and offer ways to change these configuration states. I'll wait. For the user, it's a really powerful way to handle configuration variation throughout a project allowing any permutation in a stable state. Just wish I could bang on it using the API.
Twitter: @onshapetricks & @babart1977
Here is an IR:
https://forum.onshape.com/discussion/9710/update-instance-configuration-api-endpoint#latest
IR for AS/NZS 1100
@brucebartlett assy configurations will be a nice thing.
IR for AS/NZS 1100
Twitter: @onshapetricks & @babart1977
IR for AS/NZS 1100
IR for AS/NZS 1100