Just a little background here first. So occasionally I need to generate 20+ parts & drawings all at once with known dimensions. I used to use design table to generate all configurations and run a macro to export all configurations to sldprts. However, the part file size becomes massive even after I delete the design table and for some projects I wanted to generate assemblies as well and I find that configurations get too messy.
Therefore I have been using driveworksxpress and created multiple projects. It works great especially for custom parts where the dimensions are driven by customers. However, for projects with known dimensions, is it possible to write a macro to run a driveworksxpress project and generate all combinations?
Example below where I have all the dimensions for height and width listed under the drop downs.
Thank you!
SolidworksApi/macros
Check the free SOLIDWORKS Books from Luke Malpass and also his YouTube channel AngelSix - YouTube
For video learning I can highly recommend CadSharp, MySolidWorks API and Solidprofessor
Check this code site Code Stack by Artem Taturevych
Other good site is Stack Overflow
I see, it seems like I am better off with manually running DWX for all combinations for this project with my current level of macro programming. Just curious for future if I ever need to generate way more parts in the same way with the dropdown lists, where could I find resources to learn how to write this custom macro when there is no API available?
, as I said earlier that there is no API for Xpress version. The one you are pointing to is for starting the DWX application.
So you would need a custom macro to create the required files.
Thanks Deepak for the reply. I am fairly new to macros and this is my first discussion post
I found the command (swCommands_DriveWorkXxpress) under 2018 SOLIDWORKS API Help - swCommands_e Enumeration to turn on the wizard.
Assuming that would work, in my code I would like to proceed with selecting my driveworksxpress project in the wizard, select dropdowns and click the run button. After that, ideally my code would cycle through all combinations of the dropdowns e.g. I have 5 dropdown values for both height and width. I have tried using the "record macro" command to see what the code is like when I run a driveworksxpress project but no luck.
Would you be able to point me to the right direction or where I could look this up?
I doubt that there are any API for DriveWorksXpress version but macro can be made to generate the required models and drawings based on the inputs.