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.

newSketch versus newSketchOnPlane documentation

The variable strangeness I was talking about earlier was in newSketch and newSketchOnPlane. Both take a variable called sketchPlane; only newSketchOnPlane says it does in the documentation right now, but they both do according to the starter code in the dropdown menu. However, as far as I can tell newSketch expects a query and newSketchOnPlane expects a plane. 


  • kevin_o_toole_1kevin_o_toole_1 Onshape Employees, Developers, HDM Posts: 447
    You're right that this is more confusing then it needs to be, but your conclusion is correct: newSketch expects a query for a single plane, while newSketchOnPlane expects a variable with type Plane.

    Since this is used so often, we're considering just merging these into one function, such that newSketch(context, id, {sketchPlane : p}); will do the right thing whether p is a plane or a query for a plane. 

    Your thoughts on that?

  • marena_richardsonmarena_richardson Member Posts: 20 EDU
    I think that would be a great idea!
Sign In or Register to comment.