featurescript

pierre_gr
pierre_gr Member Posts: 12 ✭✭
Hi,

The code is available here https://cad.onshape.com/documents/12312312345abcabcabcdeff/w/a855e4161c814f2e9ab3698a/e/b4277d7ee5ca49a493856c34 but how do we search in it ?

The lack of doc of featurescript could be mitigated by an easy way to search in the code.
Could we download a zip and grep locally in it ?

For exemple, I'm looking for how to use the skConstraint with RADIUS.
Which file should I look for ?

Thank you,

Comments

  • NeilCooke
    NeilCooke Moderator, Onshape Employees Posts: 6,123 image
    edited October 2017
    Hi @pierre_gr

    If you look under the help menu in Onshape you will see an entry called "FeatureScript documentation”. Also, while in a Feature Studio (or the std doc) you can use the search tool (top right, looks like a magnifying glass) to search the entire Document.
    Senior Director, Technical Services, EMEA
  • pierre_gr
    pierre_gr Member Posts: 12 ✭✭
    super :smile:

    The search tool is exactly what I was looking for.

    Thank you,
  • lana
    lana Onshape Employees Posts: 782 image
    When writing custom feature, it is better to avoid using constraints, just specify radius in skCircle or 3 points in skArc.
    If for any reason Radius constraint is important, here is the pattern:
    skConstraint(sketch, "radiusConstraint", { "constraintType" : ConstraintType.RADIUS, "localFirst" : "circle1", "length" : 20 * millimeter });
    where "circle1" is id of the circle you want to constraint.