-
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…
-
Documentation for btTypes
I'm looking for documentation on the various btTypes asked for by the Onshape API. Many of the API guides (such as here and here) are explicit that a given feature requires a specific btType, but the only help I've seen in learning the specific types is to make a feature, and then get a list of features from the API…
-
Please help me: `deterministicIds` DO NOT in ALL ids returned by `qeverything()`
I want to convert deterministicIds(in feature list) into query and then parse it. The conversion code is as follows: body = { "script": "function(context is Context, queries) { " " const _ = qEverything();" " const all_q = evaluateQuery(context, _);" " var target_q = -1;" " return transientQueriesToStrings(all_q);" " for…
-
how to use `queryString` in feature data?
I want to parse a CAD parameter data, including sketch, extrude, and chamfer, etc. I first got the feature data, and it seems that the queryString in it can help me get further information. But now I don’t know how to use queryString, can anyone help me? Thank you "featureType": "newSketch", "btType": "BTMSketch-151",…
-
Retrieve documenthistory with API
Hi, I would like to retrieve the entire documenthistory (all microversions) from a given document.Currently, I'm using the documents/documenthistory endpoint (https://cad.onshape.com/glassworks/explorer/#/Document/getDocumentHistory), but it seems only to return a fixed number of microversions from the history. To retrieve…
-
API get request: Get all Variables over all configurations
Hello i'm Daniel, I want to use the API of Onsahpe to get all the variables of all configurations in a Part Studio. Actually, i was already able to do this with the following REST Api endpoints. Step 1: First catch all the configurations in the partstudio /elements/d/{did}/{wvm}/{wvmid}/e/{eid}/configuration…
-
Multipage drawing translation into separate JPG-files
It's possible through API translate multisheet drawings into separate JPEG-files (and download them) where JPEG-name will be derived from associated sheet name? Any API that gives information about the number of sheets in a drawing, the order of the sheets and the names of the sheets?
-
Need help to get the metadata of the edges where fillet is applied (Onshape API and Featurescript)
Dear Onshape Community,I am currently exploring the Onshape API and FeatureScript and have encountered a challenge that I need your help for. https://cad.onshape.com/documents/434d4a21b8a6c0778e403fa4/w/08494f0fabeef3bd3f45494c/e/3fb329dd4fa90642555fc853 In this project, a simple geometry has been modeled where a rectangle…
-
Add feature issue in glassworks
Add feature is successful through rest api call but failed in glassworks with error message "Feature has invalid type". Any idea where it can go wrong? Thanks in advance.
-
API for creating a Part Studio?
I'm confused about this for a long time, which API should I use to create a Part Studio from an Assembly Studio in a new tab in a document?
-
translation including all pages in a drawing from API
For the time being, I need to use an image format when doing my drawing translation through the api. I am noticing that only the first sheet is being translated. This makes sense being an image file. I am not able to figure out how to create a translation of the other pages. I'm thinking there must be a way to loop through…
-
How does the createTranslation API work?
Hi, I'm trying to execute an API call to create a translation for my .step file to create a Single Part Studio in a new a tab of the document from Django backend. Unfortunately there is not much documentation for this call, the only thing explaining how to do it I've found here and it says the following:"The file is…
-
How can I change the BOM behavior of an assembly through the API?
I have a lot of drawings from my top assembly, I am kind of new to this API thing. I would like to get a list of assemblies from the top assembly, use that list to go to the respective studios, and then change the BOM behavior to Components only. Is there a way that i can do this with the API? I took a look through…
-
Reading feature related infromation
Is there any way to get the information added in feature script(samples below) through api. throw regenError("This is a regen error");reportFeatureInfo(context, id, "Some error found"); https://cad.onshape.com/documents/a63f2300d0234e62b89f906d/w/1432bb01183f19577aa937e2/e/32e2592e0830a05993a8a875
-
Sheet metal DXF export with API
Hello, It would be cool to export all of the sheet metal drawings with one mouse click.
-
Perspective View from API?
I've been successfully getting shaded views through the API using /shadedviews but I'm not seeing any way to turn perspective on... Am I just not seeing it? Any pointers on how to achieve that?