Automated flow parametric model and exports
gerco_flonk
Member Posts: 5 ✭
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!0
Answers
-
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
▚▞▚▞▚▞▚▞▚0 -
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.0

