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.

What is the API call to execute FeatureScript?

johnsoggjohnsogg Member, Developers Posts: 14
It has been suggested that it is possible to make an API call that will invoke a FeatureScript function in a particular document. I am having a hard time finding the specific call in the API Explorer. Does anybody know the specific call I should use?

For more context: I've started to build an integrated app that will do 2D nesting of a flatpack assembly. My plan is to build a FS function that returns a string (namely, SVG for the exploded 2D paths). Due to security restrictions, it seems the only way to get that svg string into my integrated app is to remotely invoke the FeatureScript.

Comments

  • mark_noyesmark_noyes Member, Onshape Employees, Developers Posts: 21
    As a start, you could take a look at the Evaluate FeatureScript API method in the Part Studios API group of the API explorer. It will give give you a very high-level overview of the API. However, the documentation there isn't really sufficient to know how to use the API. The documentation you really want is in the developer portal under the Feature list API help section. In that document you will find a more complete description plus some usage examples.
  • johnsoggjohnsogg Member, Developers Posts: 14
    Thanks Mark! I was looking for the words "invoke" and "execute". I'll check out the other docs you mentioned too.
  • mbattistellombattistello Member, Developers Posts: 51 ✭✭
    I had looked at that API for a similar request. The input I received was the call FeatureScript API was really meant to be used only for querying features via FS and not as much for executing FS create code. The team recommended I look at the API for creating features directly. 
Sign In or Register to comment.