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.

Automated flow parametric model and exports

Hello. I am currently evaluating whether I can use Onshape for a specific business solution I am exploring. I want to ensure I'm not missing any potential capabilities. My requirements are as follows:
  • Create a parametric model in Onshape, such as a box, with variables for length, width, and height.
  • Update these variables using the API.
  • Utilize the API to export all sides of the box as DXF files for laser cutting DXF (assume I’m creating side panels in my model). Ideally, all parts should be exported in a single DXF file and, if possible, arranged in a nested format (although I'm not sure if this is achievable).

Ideally, I want to execute this process dynamically, where variables only exist during the export time. I read that this might be achievable using configurations (and tried to get this to work). However, I understand that configurations need to be predefined, which implies creating a configuration for every possible measurement combination beforehand, and this isn't feasible.

For additional context: I am a web developer with proficiency in APIs, Python, and JavaScript.

Thank you in advance!

Answers

  • MichaelPascoeMichaelPascoe Member Posts: 1,989 PRO
    edited December 2023

    As far as the nesting goes, you can use the custom feature Auto Layout .
    It should be possible to export a DXF of a face or drawing with Onshape's API.

    I'm one of the developers with CADSharp. Reach out to us if you need any FeatureScript or API implemented: michael.pascoe@cadsharp.com


    Learn more about the Gospel of Christ  ( Here )

    CADSharp  -  We make custom features and integrated Onshape apps!   Learn How to FeatureScript Here 🔴
  • eric_pestyeric_pesty Member Posts: 1,891 PRO
    Can't comment too much on the API side of things as I don't know much about it, but on the modeling front you can use configuration variables to easily generate any "size" without having to pre-define them.
    That said you might even not need to use configurations (or even variables) as I assume you would be able to change a model dimension through the API (but don't quote me on that...). Regardless the configuration variable way might be the simplest anyway. 
Sign In or Register to comment.