hide sketches created by FS

pierre_gilles
pierre_gilles Member, Developers Posts: 7 ✭✭
Hi everyone,

So I am new at Featurescript and I am designing a featureScript to generate screw and nut quickly. I am expecting to use this featurel to generate Standard part library quickly.

To generate the 3D geometry of the screw and nut I have to generate sketch through featureScript. And I was wondering if there was an option or something to hide the sketches generetaed by the feature?

The feature is here :
https://cad.onshape.com/documents/6b39b9ae253c916b8d16eee4/w/3e8761870ba827eda059d776/e/9f927c7230b9ca06f43382b6


regards,
Tagged:

Comments

  • ilya_baran
    ilya_baran Onshape Employees, Developers, HDM Posts: 1,279 image
    Just call at the end:
    opDeleteBodies(context, id + "deleteSketches", { "entities" : qCreatedBy(id + "YourSketchId") });
    Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc
  • leon_poot
    leon_poot Member, Developers Posts: 87 ✭✭✭
    edited March 2017
    Hiding the Feature would hide the sketches in it, but if you never wish to see them again: use opDeleteBodies on the sketch created in your FS.

    Edit: never mind, didn't see Ilya's comment there.
    "A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools." - Douglas Adams, Mostly Harmless
  • pierre_gilles
    pierre_gilles Member, Developers Posts: 7 ✭✭
    Great, Thank You very much