-
Performing a search query through the API
When I do this, I have been able to get this end point to work. https://cad.onshape.com/api/v5/documents?nodeId=1&q=_all:P0803&resourceType=filter This seems to search through all of onshape and not just in my company or "my onshape". Also, I cannot seem to get any other q parameters to work. I try using state, or when and…
-
API and Inspection Tables - Quality Control
Has anyone used API to export Inspection Tables to integrate on a secondary software (Dynamics per example) so that the production floor can make the measeurements and verifications required directly in Dynamics? Basically the ideia is to use the Inspection Table as input to Microsoft Dynamics to create the parametrization…
-
How can I generate a line in 3D space and extrude a circle along it using the Onshape REST API?
-
Editing Hole Callout formula
Counterdrill hole (Countersink hole + Extra head clearance) is an option available in other CAD software, but doesn't seem to be an option with Onshape currently. I have cobbled together a feature script based on Hole feature that does the job geometrically, but the callout is as if it's just a Countersink hole. I'm…
-
API rollbackBarIndex functionality
Hi, I'm trying to output the feature tree from a part studio via python - specifically via onshape-client.client.Client.api_client.request(…) (here) With a standard request, I can output the appropriate response json via the link:…
-
Creating A folder within a document from the API
Hey Hey, Currently trying to make a script that monitors for new documents, then formats them as soon as I create them to avoid having to spend 5 mins formatting a doc when I create it. The structure I am going for involves having folders for parts, drawings, and subassemblies, but I can't seem to find a way to create a…
-
API Support for C# Application
Good morning, I have been going through the examples for the API and looking for a little help / guidance from the community on how to accomplish my sample task. In essence I am trying to create a new drawing, insert 2 sample DWG blocks inside it at specific coordinates, and then export the drawing to an Azure BLOB. All of…
-
How to export a part (not partstudio) as a STEP file using Onshape API
I'm writing a script to automate a bunch of exports and gather other part information and I was previously using the URL "https://cad.onshape.com/api/v6/assemblies/d/{document_id}/w/{workspace_id}/e/{element_id}/translations" but I realized after a bit that this exports the full part studio, as the URL only goes far enough…
-
Issue - POST Request page has the jitters.
At: Introduction to the Onshape API - About POST Requests | Onshape Learning Center MP4 of issue:
-
How to Set Sketch Origin to Plane Origin in Onshape?
I have some CAD feature models that include planar sketches defined by 3D points and coordinate systems, as well as extrusions. Now, I need to recreate the same models in Onshape based on this data. The main issue arises during the sketching process. Since Onshape's GUI does not allow defining a sketch plane's origin using…
-
Any way to translate an exploded view?
Hi, I'm looking for a way to translate exploded views and their individual steps to multiple gLTF files. The real goal is to be able to use the standard web interface to create parts and assemblies. Then create exploded views of the assemblies. In our own webapp we would then use the API to update the parts by updating the…
-
Can I hide a plane or something through an API?
On Onshape, I can right-click to hide it I have already tried this /partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/features But I found that hiding and not hiding request results are the same
-
I want to create a new removed stretch via API
I refer to this website https://onshape-public.github.io/docs/api-adv/featureaccess/#create -The A-cylinder learned how to create a new stretch, but I don't know how to create a removed stretch. I replaced NEW with REMEVE, but I found that the newly created stretch reported an error and lacked the merge scope. I think the…
-
Is there any way to obtain the x-axis and y-axis of a plane through API?
I want to model through API calls, but my sketch is a 3D coordinate point, and I think it needs to be converted before it can be drawn on a plane. However, I am not sure about the rules of coordinates on a plane. Thank you to everyone who helped me.
-
qCreatedBy(sketch_id, EntityType.EDGE) returns more edges than I drew
I drew a sketch with 11 edges, but qCreatedBy(sketch_id, EntityType.EDGE) returned 24 edges, and I parsed these edges and found that some of them were overlapping (all parameters were the same, except for deterministicId). Why is this happening? What are these "copied edges" used for?
-
Can mass properties of parts be accessed in the context of an assembly?
I'm looking to export a list of mass, volume and centroid of all of the parts in an assembly. As far as I can tell endpoint: /assemblies/d/{did}/{wvm}/{wvmid}/e/{eid}/massproperties, only allows to show the mass properties of the entire assembly. From there I explored getting the assembly definition, and looping over every…
-
Integration with ERP/CRM Software (In Particular Dolibarr)?
Does anyone know of any particular way to integrate OnShape's PDM software with ERP/CRM software (in particular, Dolibarr https://www.dolibarr.org/ for my purposes)? If there were a way to directly import or, better yet, have my list of created assemblies and/or parts just integrate with Dolibarr so 1) I don't have to type…
-
POST /elements/copyelement/{did}/workspace/{wid} return Bad Request
I want to copy an element from another workspace to my workspace. The API code I called is as follows, but it returns 400 Bad Request. Why can't I copy it? def copyElement(self, source_url, target_url): v_list = source_url.split("/") sdid, swid, seid = v_list[-5], v_list[-3], v_list[-1] v_list = target_url.split("/") tdid,…
-
Adding dimensions to sketch features via API
Though there are guides published for adding dimensions to drawings here, I can't find any sources for how to add a dimension to a part studio. The closest I've gotten is by creating a BTMSketchConstraint2 with "DISTANCE" as the constraint type. That applies a distance dimension, but I'm struggling to get it to reference…