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.

Access to API methods from feature script

alex_krygluialex_kryglui Member Posts: 1 EDU
Hi, all.
I recently began to learn the feature script. And I have such a question. Is it possible to get access to api methods in a feature script?

Comments

  • Jake_RosenfeldJake_Rosenfeld Moderator, Onshape Employees, Developers Posts: 1,646
    @alex_kryglui

    FeatureScript is used to define Part Studio features.  In fact, all of our Part Studio features (extrude, sweep, loft, revolve, mirror, etc.) are written in FeatureScript.  FeatureScript can only make changes to the geometry and metadata of a single part studio.  It cannot do the higher-level operations of the API such as: editing the parameters of other features, editing assemblies, creating new part studios, etc.

    That being said, there is some overlap of the functionality.  What are you looking to do specifically?


    Jake Rosenfeld - Modeling Team
  • Ethan_KEthan_K Member, Onshape Employees Posts: 57
    Hi Alex, 

    That is not possible. FeatureScript and the API are two separate entry points to Onshape. FeatureScript is sandboxed within a single feature, whereas the API has the ability to add and remove features, fetch parts, set properties, and much more.

    In general, the breakdown is: features/featureScript are for geometric operations. You can get a feel of their flexibility by looking at the curated list of featurScripts. 

    Tha API, on the other hand, is aimed at app developers who disseminate their apps on the Onshape app store. 
Sign In or Register to comment.