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.

Add custom feature to a sketch.

chess_denmanchess_denman Member Posts: 2

Forgive what is a really beginner question.
I am trying to write myself two custom features to work inside sketches.
I want simply to create two lines either side of a center line (ie offset right and left)
I also want to place a circle at the geometric center of a set of lines (eg the center of a rectangle).

These are things I do often.
I am therfore learning featurescript.
what I cannot work out how to do is to add a feature specifically to the sketching bit of onshape as opposed to adding one to the part studio.
I can see others have done it.
I think for example here:
https://cad.onshape.com/documents/d8aab1e0e7ae10038a6830e0/w/9dfdd631d025960813b8f2df/e/421758eb171fa79c9a45f9a6

but I am a bit too much of a beginnenr to distill the core elements of the script down to just what adds a feature to a sketch page

Chess

Comments

  • S1monS1mon Member Posts: 3,202 PRO

    Custom features can operate on sketches, but not within the Sketcher.

  • EvanReeseEvanReese Member, Mentor Posts: 2,271 ✭✭✭✭✭

    You cannot create a feature that you can use inside of a sketch. However you can produce standalone sketches with featurescript. For example, you could write a script that creates a sketch circle around any points you pick. Examples of your end goal would help me know how to help.

    Evan Reese
Sign In or Register to comment.