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.

Help with FS Tutorial

Hey all! I'm just jumping into FeatureScript for the first time and I'm working my way through the Onshape tutorial for the slot:

https://cad.onshape.com/FsDoc/tutorials/create-a-slot-feature.html

I've gotten a few steps into the code and I'm getting this error:



I've tried to figure out what it is, and I can't seem to get my head around to it. I'm very new to any kind of programming so it's likely something obvious.

To make sure it wasn't my fault, I copied in the final code at the end of the tutorial and also got the same error so it looks like something isn't right with the tutorial itself.

Could anyone help this rookie out?

Comments

  • MBartlett21MBartlett21 Member, OS Professional, Developers Posts: 2,050 ✭✭✭✭✭
    @eric_schimelpfenig

    The slot path needs to be a sketch edge, not any other edge.
    The filter for the slotPath parameter should be EntityType.EDGE && SketchObject.YES to clarify that it needs to be a sketch edge and prevent the user from selecting any other edge.
    I think the next tutorial (Adding geometry to the slot) does some more about the filters.
    mb - draftsman - also FS author: View FeatureScripts
    IR for AS/NZS 1100
  • kevin_o_toole_1kevin_o_toole_1 Onshape Employees, Developers, HDM Posts: 565
    Everything looks good to me. Make sure when you double-click your feature in the Part Studio select a slot path, there is a sketch edge selected.

    If you make the document public and post a link here, it will be easy to diagnose exactly what's happening.
  • eric_schimelpfenigeric_schimelpfenig Member Posts: 75 EDU
    @eric_schimelpfenig

    The slot path needs to be a sketch edge, not any other edge.
    The filter for the slotPath parameter should be EntityType.EDGE && SketchObject.YES to clarify that it needs to be a sketch edge and prevent the user from selecting any other edge.
    I think the next tutorial (Adding geometry to the slot) does some more about the filters.
    That did it! I guess that tutorial hasn't been updated in a while. I'm going to continue ahead with the rest of it and see if I can build a sketch... 

    THANK YOU!
Sign In or Register to comment.