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.


Generating a sketch that can be derived in other part studios

Cedric_EveleighCedric_Eveleigh Member, OS Professional, csevp Posts: 61 PRO
I'm new to feature script. I'm trying to create a feature script that generates a sketch that can be derived in another part studio. So far, the feature script generates a sketch, but this sketch is not shown as an option when attempting to derive it in another part studio.

Standard sketches can be derived, so I looked into the standard sketch feature (sketch.fs in the std code), and I tried copying some stuff, but I couldn't get something working. I don't understand what's going in sketch.fs (with the startFeature, endFeature, return newSketchOnPlane, etc). 

Any help is appreciated.


  • Options
    Alex_KempenAlex_Kempen Member Posts: 244 EDU
    Okay, this is a bit curious. I believe there's some internal juju going on with sketches created using the sketch feature which makes them available for individual selection in the derive menu. Notably, selecting an entire part studio will bring in any FS-created sketches (along with everything else in the part studio), but FS-created sketches can't be selected individually, and the part studio won't be available as an option if the only thing inside the part studio are FS-created sketches. Fortunately, this last part can be circumvented by adding pretty much anything, including an empty sketch:

    Still, it's quite annoying to have to put an empty sketch in every part studio and remember to select the entire part studio when deriving.
    CS Student at UT Dallas
    Check out my FeatureScripts here:

  • Options
    Cedric_EveleighCedric_Eveleigh Member, OS Professional, csevp Posts: 61 PRO
    I need to derive a specific sketch (hopefully generated by a feature studio) from a part studio with a lot of content, so it's not an option to derive the whole part studio. Your suggestion is interesting but it doesn't solve my problem.
  • Options
    caden_armstrongcaden_armstrong Member, User Group Leader Posts: 127 ✭✭✭
    As you've figured out, a sketch generated from a featurescript is not equivalent to an original sketch.
    The only way I know of to achieve what you're trying to do is with the API.
    The API can be used to create "real" sketches programmatically. 
    I've also been able to take a sketch from one part studio and recreate it in another using the API, but I'm not sure if that can be done with a sketch created via FS. It might be possible I just haven't tried it yet.
Sign In or Register to comment.