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.

Exporting to dxf from FeatureScript

eli_4eli_4 Member Posts: 1
edited November 2016 in Community Support
I'm generating several slightly varied sketches using FeatureScript. Is there a way to make the script export each sketch as a dxf? I'd rather not right click each one to export it after.

Answers

  • ilya_baranilya_baran Onshape Employees, Developers, HDM Posts: 1,215
    Unfortunately not -- FeatureScript is for regeneration logic only.  Automating tasks like export can be done via the API I believe.  @andrew_kimpton?
    Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc
  • awkawk Member, Onshape Employees, Developers Posts: 78
    We have an api that can be used (via REST, from an external application) that can get the tessellated sketch entities - 
    GET /api/partstudios/d/:did/[wvm]/:wvm/e/:eid/sketches/:sid/tessellatedentities this is not quite the same data as would be in a DXF however,  notably curves will be straight lines controlled by tolerance values supplied when making the API call.

    Further information can be found by registered developers in the API explorer  - if you're not already registered as a developer begin by signing in at https://dev-portal.onshape.com with the same credentials you use at https://cad.onshape.com.

    I have logged an internal request to provide an API to export a sketch as a DXF file.
    Director of API, Appstore, and App Partner Technical Support
  • Girish_JoshiGirish_Joshi Member, Developers Posts: 4
    edited January 2017
    Hello,

    In-line with the question above, I am planning to export into STL file format using FeatureScript.
    Is it possible to call Onshape REST APIs (or any other web based end-point) using FeatureScript?

    After that we might be able to provide options to export in various custom formats from FeatureScript itself.
    Thanks.
  • awkawk Member, Onshape Employees, Developers Posts: 78
    As Ilya previously mentioned FeatureScript is only for the logic of regenerating parts. There's no mechanism to call any REST API (external or internal to Onshape).
    Director of API, Appstore, and App Partner Technical Support
  • Girish_JoshiGirish_Joshi Member, Developers Posts: 4
    Thanks Andrew for the information.
  • Sean_McCluskeySean_McCluskey Member Posts: 1
    @awk

    Has the API been updated since this thread was last active? I'm looking to export all planar faces of an object as DXF from an external source (or internal source to start). 
Sign In or Register to comment.