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.

Where is the FeatureScript source for the sample Spur Gear generator?

jon_woellhafjon_woellhaf Member Posts: 92 ✭✭✭
FretureScript is a wonderful addition! Where can I find the FeatureScript source for the sample Spur Gear generator?

Best Answer

Answers

  • jon_woellhafjon_woellhaf Member Posts: 92 ✭✭✭
    Thank you. I found it at the link, but don't understand what "the Spur Gear document itself" means.
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,688
    A custom feature must live in a Document somewhere - in the Spur Gear Document there is a tab for instructions on how to use the feature, a Part Studio example of several types of gears, an assembly of the gears (try the new animate on one of the revolution joints), and of course the Feature Studio itself with the code. 
    Senior Director, Technical Services, EMEAI
  • jon_woellhafjon_woellhaf Member Posts: 92 ✭✭✭
    NeilCooke said:
    A custom feature must live in a Document somewhere - in the Spur Gear Document there is a tab for instructions on how to use the feature, a Part Studio example of several types of gears, an assembly of the gears (try the new animate on one of the revolution joints), and of course the Feature Studio itself with the code. 
    Understood. But where is the "Spur Gear Document?"
  • jakeramsleyjakeramsley Member, Moderator, Onshape Employees, Developers, csevp Posts: 661
    NeilCooke said:
    A custom feature must live in a Document somewhere - in the Spur Gear Document there is a tab for instructions on how to use the feature, a Part Studio example of several types of gears, an assembly of the gears (try the new animate on one of the revolution joints), and of course the Feature Studio itself with the code. 
    Understood. But where is the "Spur Gear Document?"
    In Onshape, you create documents that contain Part Studios, assemblies, drawings, foreign data, Feature Studios, etc.  In the case of the spur gear code, it resides in a document that Neil owns called "FeatureScript Spur Gear" which includes a PDF on how to use the spur gear feature, a Part Studio using the feature to generate gears, an assembly that shows how the gears can be mated, as well as a Feature Studio where the code was written and lives.  The document is public so that everyone in Onshape can view it.
    Jake Ramsley

    Director of Quality Engineering & Release Manager              onshape.com
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,688
    The doc is the link above (which is taking you directly to the feature studio)
    Senior Director, Technical Services, EMEAI
  • shashank_aaryashashank_aarya Member Posts: 265 ✭✭✭
    Thanks for adding feature script. Its really awesome! I noticed one thing. When any custom feature is added, in feature tree it is shown with linked document icon. It means that developer can change the script to add more parameters in new version of the document where the feature script is created. So, after updating to latest version, changes appears in model. But since feature script samples are from public documents it could not be easy to know if script has been updated in new version. So, every time I need to open the part studio and see if linked document icon is highlighted. In this case I feel it would be nice if user gets notification on main document page for available updates in any document versions, which are used as linked documents for custom features.
  • ilya_baranilya_baran Onshape Employees, Developers, HDM Posts: 1,215
    Thanks, @shashank_aarya !

    Showing documents that can be updated is an interesting suggestion -- we'll think about how to do it.  That said, updating custom features is not at all necessary unless you want the new behavior or new functionality in the updated version (and I would expect most of the time if you have a part that is already modeled than you're ok with the geometry the feature produces).  It's not like installed software where you need to update frequently or risk security holes and bugs.

    Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc
Sign In or Register to comment.