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.

Wanted: Sane API that Corresponds to Interface Actions

asher_haigasher_haig Member Posts: 19

Why is this not an automatic assumed given?

Why is the norm for writing OnShape code that we are expected to re-implement the features already provided by the app but not provided to the API?

Why can't we construct sketches by describing their constraints, the same way we would in the app?

Why aren't products of code accessible as first-class objects?

It's offensive how silly the API is. Why isn't there a real API that works the intelligent way the app works?

Tagged:

Comments

  • asher_haigasher_haig Member Posts: 19

    And why can't we name sketches? That's so far beyond insane I can't even comprehend it. It undermines all basis for organization.

  • Paul_J_PremakumarPaul_J_Premakumar Member, Onshape Employees Posts: 234

    @asher_haig , And why can't we name sketches? : Can you let us know what you tried? You should be able to set the name of the sketch at creation see this example : https://onshape-public.github.io/docs/api-adv/featureaccess/#create-a-sketch-via-querystring or if you want to update the name of a sketch (or any other feature) see this example : https://onshape-public.github.io/docs/api-adv/featureaccess/#update-a-feature

  • asher_haigasher_haig Member Posts: 19

    How can it be done in Featurescript rather than via an external URL call?

    I'm looking for something sane like:

    var sketch = newSketchOnPlane(context, sketch_id, {
        "Name" : "Neck Relief Sketch",
        "sketchPlane" : plane
    });
    sketch.name = "Neck Relief Sketch";
    

    Also, why doesn't it simply use the already provided "Name" parameter? This seems so basic.

  • Paul_J_PremakumarPaul_J_Premakumar Member, Onshape Employees Posts: 234
    edited August 11

    Hi Asher, Currently we do not have the ability to set sketch feature names via FeatureScript. I created an improvement request for this.

  • _anton_anton Member, Onshape Employees Posts: 480

    Also, why doesn't it simply use the already provided "Name" parameter?

    newSketchOnPlane has no "Name" parameter, as far as I know. It *is* a fair point that the Sketch 1, etc. under the feature can't be named; feel free to vote on the improvement request.

  • asher_haigasher_haig Member Posts: 19

    Where do I find the improvement request?

  • Paul_J_PremakumarPaul_J_Premakumar Member, Onshape Employees Posts: 234

    If you check your support tickets, you should the improvement request we created for you.

Sign In or Register to comment.