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.

Options

Featurescript exporting a .txt or similar file type

darren_13darren_13 Member, Developers Posts: 118 ✭✭
I am mainly concerned with creating aerofoil scripts, one of the things I wish to do is create an aerofoil in OnShape and then use the 2D coordinates to analyse in an aerofoil analysis tool. So is it possible for me to export a text file from featurescript? an alternative would be to print the coordinates in the cmd line and copy and paste.

Comments

  • Options
    owen_sparksowen_sparks Member, Developers Posts: 2,660 PRO
    I believe FS has been written to prohibit writing to external files.  What it can do though is write as much text as you like to the degug window (aka FS notices pane) which you could cut 'n' paste to a file if that helps?

    Owen S.
    Business Systems and Configuration Controller
    HWM-Water Ltd
  • Options
    darren_13darren_13 Member, Developers Posts: 118 ✭✭
    Hi @owen_sparks, cheers for the comment. I think yes in the short term this would be ok, but if I want to export more than just 2D points as a txt file I will need more control over exporting and writing files. Do you know if the API gives me the extra capability? was also wondering if I could venture into the unknown there?
  • Options
    kevin_o_toole_1kevin_o_toole_1 Onshape Employees, Developers, HDM Posts: 565
    @darren_13 Without the API, yes, copy-paste is your only route. You could submit an improvement request to have the console output be more easily downloadable as a .txt file, or to have some mechanism of outputting that text separate from other stuff in the console.

    With the API, you can use a Part Studios: Evaluate FeatureScript call to evaluate any FeatureScript function on a Part Studio. That function can return a string, and from there you can take that string and do whatever you please.

  • Options
    darren_13darren_13 Member, Developers Posts: 118 ✭✭
    Cheers for your reply @kevin_o_toole_1, ok the end goal is to go from coordinates (2D) as a .txt for an external mesh to some form of very quick aerofoil solver within OnShape (imagine the usual aerofoil tools). I think I am at some point going to hit a limit to what the feature script can do, maybe I'm going too far away from a feature and into the realms of an app. 

    I presume an app can be developed to run entirely on OnShape? (sorry for the nieve questions, I cannot find a lot of information on the API)

    Cheers,
    Darren
  • Options
    kevin_o_toole_1kevin_o_toole_1 Onshape Employees, Developers, HDM Posts: 565
    Yes, an app can be a "integrated cloud app", which means the app gets created as a tab in your Onshape document, where the app interface is displayed.

    The place to get started is dev-portal.onshape.com, where you'll find docs, keys, and a link to create an application.
Sign In or Register to comment.